PUGE 2 vuotta sitten
vanhempi
sitoutus
46bb7b9847
5 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 4 3
      back/background.js
  2. 1 2
      back/insert.js
  3. 0 0
      background.js
  4. 0 0
      insert.js
  5. 1 1
      manifest.json

+ 4 - 3
back/background.js

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

+ 1 - 2
back/insert.js

@@ -8,7 +8,7 @@
 function addScr (data) {
   if (!document.body) {
     setTimeout(() => {
-      console.info('尝试重新加载:' + data)
+      // console.info('尝试重新加载:' + data)
       addScr (data)
     }, 100);
     return
@@ -18,7 +18,6 @@ function addScr (data) {
   script.charset = "UTF-8";
   script.innerHTML = data;
   document.body.appendChild(script)
-
 }
 
 function loadJS( url, callback ){

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
background.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
insert.js


+ 1 - 1
manifest.json

@@ -1,7 +1,7 @@
 {
 	"manifest_version": 2,
 	"name": "脚本助手",
-	"version": "1.1.23",
+	"version": "1.1.24",
 	"description": "脚本助手",
 	"icons": {
 		"16": "./img/16.png",

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä