代码拉取完成,页面将自动刷新
let fullWidth=1440
let fullHeight=900
let newTabUrl=''
document.querySelector("#splitScreen").addEventListener("click", ()=>{
fullWidth=window.screen.width
fullHeight=window.screen.height
chrome.windows.getCurrent((win)=>{
chrome.windows.update(win.id,{
width:fullWidth/2,
height:fullHeight,
top:0,
left:0
}, ()=>{})
});
chrome.tabs.query({active: true,currentWindow: true, highlighted: true},
(tabs) =>{
newTabUrl=tabs[0].url
//创建新窗口
chrome.windows.create({
width:fullWidth/2,
height:fullHeight,
top:0,
left:fullWidth/2,
url:newTabUrl,
},()=>{});
});
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。