1
0
mirror of https://gitee.com/bitdance-team/chrome-extension synced 2025-10-08 08:45:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

主面板翻译和截图使用前先判断是不是chrome://开头网页;翻译的后台代码独立成单独文件;Google广告屏蔽前如果是chrome://开头网页则跳过

This commit is contained in:
2022-02-09 22:15:58 +08:00
parent afb773faa3
commit fdfce0b77c
6 changed files with 37 additions and 21 deletions

View File

@@ -48,13 +48,3 @@ chrome.contextMenus.create({
showNotification()
}
})
function tranBit(){
console.log("开始插入翻译页面")
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
console.log(tabs)
chrome.tabs.executeScript(tabs[0].id, { file:'./assets/js/translate/tran.js', runAt: 'document_start' })
chrome.tabs.insertCSS(tabs[0].id, { file:'./assets/css/tran.css', runAt: 'document_start' })
})
}