mirror of
https://gitee.com/bitdance-team/chrome-extension
synced 2025-10-08 08:45:14 +08:00
主面板翻译和截图使用前先判断是不是chrome://开头网页;翻译的后台代码独立成单独文件;Google广告屏蔽前如果是chrome://开头网页则跳过
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// refer: https://www.it1352.com/1996113.html
|
||||
chrome.webRequest.onBeforeRequest.addListener(
|
||||
function (details) {
|
||||
if (!details || !details.initiator || !details.url)
|
||||
return { cancel: false }; // 如果没有请求信息,则可能是chrome://开头的页面,不处理
|
||||
let isBlock = false
|
||||
|| details.initiator === "https://googleads.g.doubleclick.net"
|
||||
|| details.initiator.indexOf("googleads.g.doubleclick.net") != -1
|
||||
|
Reference in New Issue
Block a user