|
|
@@ -57,7 +57,7 @@ function reGetData (url, callBack) {
|
|
|
fetch(`${serverUrl}&username=` + (userInfo.username || ''), {
|
|
|
method: 'POST',
|
|
|
body: JSON.stringify({
|
|
|
- "edition": 5,
|
|
|
+ "edition": 6,
|
|
|
"url": url
|
|
|
}),
|
|
|
redirect: 'follow'
|
|
|
@@ -73,7 +73,7 @@ function reGetData (url, callBack) {
|
|
|
|
|
|
// 监听消息
|
|
|
chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
|
|
|
- console.log(message)
|
|
|
+ // console.log(message)
|
|
|
switch (message.name) {
|
|
|
case 'getData':
|
|
|
const nowTime = Date.parse(new Date())
|
|
|
@@ -128,7 +128,8 @@ function lanjie (blockList) {
|
|
|
|
|
|
for (const key in blockList) {
|
|
|
if (details.url.includes(key) || new RegExp(key).test(details.url) || details.url == key) {
|
|
|
- // console.log(details.url)
|
|
|
+ console.log(`拦截请求:${details.url}`)
|
|
|
+ console.log(`替换请求:${blockList[key]}`)
|
|
|
return {
|
|
|
redirectUrl: blockList[key]
|
|
|
}
|