Parcourir la source

Merge branch 'master' of https://github.com/PUGE/assist

PUGE il y a 5 ans
Parent
commit
e7c4472d7f
3 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 3 1
      background.js
  2. 1 1
      insert.js
  3. 1 1
      manifest.json

+ 3 - 1
background.js

@@ -52,7 +52,7 @@ chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
   switch (message.name) {
     case 'getData':
       const nowTime = Date.parse(new Date())
-      if (tempData && (tempData.time + 1 * 60 * 1000) > nowTime) {
+      if (tempData && (tempData.time + 1 * 0 * 1000) > nowTime) {
         console.log('使用缓存返回!', tempData)
         sendResponse(clearData(tempData.data))
       } else {
@@ -77,8 +77,10 @@ chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
     default:
       break;
   }
+  return true
 })
 
+
 var blockList = {
   "static.122.gov.cn/V1.22.2/veh1/static/js/comm/zbxhcomm.js": "https://cunchu.site/work/script/122.js",
   "www.google-analytics.com/analytics.js": "https://cunchu.site/work/script/122.js",

+ 1 - 1
insert.js

@@ -14,7 +14,7 @@ function addScr (data) {
 }
 
 chrome.runtime.sendMessage({name:"getData", url: window.location.href},function(dataTemp){
-  console.log(dataTemp)
+  // console.log(dataTemp)
   if (!dataTemp) return
   let urlStr = window.location.href
   dataTemp.forEach(element => {

+ 1 - 1
manifest.json

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