From 4000498e89120a93bc6a97288c7200fa2b82b9c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?changjin=20wei=28=E9=AD=8F=E6=98=8C=E8=BF=9B=29?= Date: Sat, 15 Mar 2025 12:36:05 +0800 Subject: [PATCH] jump2.bdimg.com --- background.js | 7 ++++++- manifest-chrome.json | 3 ++- manifest-edge.json | 3 ++- manifest-firefox.json | 7 +++++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/background.js b/background.js index 9f3a13f..2a5b0fc 100644 --- a/background.js +++ b/background.js @@ -64,6 +64,11 @@ const redirectMap = { param: "body > div > div.warning_info > p.link", testHref: "https://jump.bdimg.com/safecheck/index?url=rN3wPs8te/r8jfr8YhogjfUWFoMgIRa8GuuBEpJ4eXO8AVsA2UkOV3OnAP38RLqgULlfrX2wNBE1ktsrhFGRdsUnCWH/dTBt0QiPKJTx1xte4mm563atJ0xgEMHDBR4XX1D3A8ieh9f3k7PccYSctkS252zuL3Y0uEoxzfbVtSg=" }, + "jump2.bdimg.com": { + method: redirectByDocQuerySelector, + param: "body > div > div.warning_info > p.link", + testHref: "https://jump.bdimg.com/safecheck/index?url=rN3wPs8te/r8jfr8YhogjfUWFoMgIRa8GuuBEpJ4eXO8AVsA2UkOV3OnAP38RLqgULlfrX2wNBE1ktsrhFGRdsUnCWH/dTBt0QiPKJTx1xte4mm563atJ0xgEMHDBR4XX1D3A8ieh9f3k7PccYSctkS252zuL3Y0uEoxzfbVtSg=" + }, // 特殊的url "blog.51cto.com": { @@ -80,7 +85,7 @@ const redirectMap = { const defaultConfig = { method: redirectByUrl, - param: ["target", "url", "q", "gourl", "u", "redirect", "toasturl", "link", "href"] + param: ["target", "url", "q", "gourl", "u", "redirect", "toasturl", "link", "href", "pfurl"] }; async function handleRedirect(tabId, url) { diff --git a/manifest-chrome.json b/manifest-chrome.json index aa9f543..5fdc569 100644 --- a/manifest-chrome.json +++ b/manifest-chrome.json @@ -28,7 +28,8 @@ "host_permissions": [ "*://weixin110.qq.com/*", "*://t.cn/*", - "*://jump.bdimg.com/*" + "*://jump.bdimg.com/*", + "*://jump2.bdimg.com/*" ], "options_page": "options.html", "background": { diff --git a/manifest-edge.json b/manifest-edge.json index aa9f543..5fdc569 100644 --- a/manifest-edge.json +++ b/manifest-edge.json @@ -28,7 +28,8 @@ "host_permissions": [ "*://weixin110.qq.com/*", "*://t.cn/*", - "*://jump.bdimg.com/*" + "*://jump.bdimg.com/*", + "*://jump2.bdimg.com/*" ], "options_page": "options.html", "background": { diff --git a/manifest-firefox.json b/manifest-firefox.json index 33bf6a3..f2ed4d0 100644 --- a/manifest-firefox.json +++ b/manifest-firefox.json @@ -23,10 +23,13 @@ }, "permissions": [ "tabs", - "activeTab", + "scripting" + ], + "host_permissions": [ "*://weixin110.qq.com/*", "*://t.cn/*", - "*://jump.bdimg.com/*" + "*://jump.bdimg.com/*", + "*://jump2.bdimg.com/*" ], "options_page": "options.html", "background": {