1
0
mirror of https://gitee.com/bitdance-team/chrome-extension synced 2025-10-08 16:55:17 +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

@@ -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