Explorar o código

初步v3版本

PUGE hai 7 meses
pai
achega
9135a65bc9
Modificáronse 6 ficheiros con 19 adicións e 15 borrados
  1. 2 2
      back/background.js
  2. 0 0
      background.js
  3. 0 0
      insert.js
  4. 0 0
      js/options.js
  5. 0 0
      js/popup.js
  6. 17 13
      manifest.json

+ 2 - 2
back/background.js

@@ -89,7 +89,7 @@ chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
       break;
     case 'clear':
       tempData = null
-      fetch(`http://cunchu.site/data/blockList.json`).then(data => data.json()).then(dataTemp => {
+      fetch(`https://assist.lamp.run/blockList`).then(data => data.json()).then(dataTemp => {
         blockListTemp = dataTemp
         chrome.storage.sync.set({userInfo: {}})
         userInfo = {}
@@ -114,7 +114,7 @@ var blockListTemp = null
 if (blockListTemp != null) {
   lanjie(blockListTemp)
 } else {
-  fetch(`http://cunchu.site/data/blockList.json`).then(data => data.json()).then(dataTemp => {
+  fetch(`https://assist.lamp.run/blockList`).then(data => data.json()).then(dataTemp => {
     blockListTemp = dataTemp
     lanjie(dataTemp)
   })

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
background.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
insert.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
js/options.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
js/popup.js


+ 17 - 13
manifest.json

@@ -1,21 +1,20 @@
 {
-	"manifest_version": 2,
+	"manifest_version": 3,
 	"name": "脚本助手",
-	"version": "1.2.4",
+	"version": "2.0.0",
 	"description": "脚本助手",
 	"icons": {
-		"16": "./img/16.png",
-		"48": "./img/48.png",
-		"128": "./img/128.png"
+		"16": "img/16.png",
+		"48": "img/48.png",
+		"128": "img/128.png"
 	},
-	"browser_action":  {
+	"action":  {
 		"default_icon": "img/48.png",
 		"default_title": "脚本助手",
 		"default_popup": "popup.html"
 	},
 	"background": {
-		"persistent": true,
-		"scripts": ["background.js"]
+		"service_worker": "background.js"
 	},
 	"content_scripts": [
 		{
@@ -26,21 +25,26 @@
 		}
 	],
 	"permissions": [
+		"scripting",
 		"storage",
 		"activeTab",
 		"webRequest",
-		"webRequestBlocking",
-		"notifications",
+		"notifications"
+	],
+	"host_permissions": [
 		"http://*/*",
-  		"https://*/*"
+		"https://*/*"
 	],
 	"externally_connectable": {
-		"matches": []
+		"matches": [
+			"https://demos.run/*",
+			"https://cunchu.site/*"
+		]
 	},
 	"homepage_url": "https://github.com/PUGE",
 	"options_page": "options.html",
 	"options_ui": {
 		"page": "options.html",
-		"chrome_style": true
+		"open_in_tab": true
 	}
 }

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio