From 97d7bc0f4e4050afff3bf997ce95666017375f83 Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Sat, 24 May 2025 09:16:03 +1000 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=92=8C=E6=A0=B7=E5=BC=8F=E4=BB=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81TailwindCSS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加TailwindCSS依赖并配置Vite插件 - 修改App.vue中的文本内容 - 清理background.js中的冗余日志 - 更新index.html中的脚本路径以支持本地开发 - 在manifest.json中添加localhost权限和CSP配置 --- index.html | 2 +- public/background.js | 2 -- public/manifest.json | 8 ++++++-- src/App.vue | 2 +- src/style.css | 1 + vite.config.ts | 3 ++- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 6348fad..d2766ed 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,6 @@
- + diff --git a/public/background.js b/public/background.js index 2a5405e..e181713 100644 --- a/public/background.js +++ b/public/background.js @@ -1,5 +1,3 @@ -console.log('background.js loaded 55555') - chrome.webRequest.onBeforeRequest.addListener( (details) => { console.log( diff --git a/public/manifest.json b/public/manifest.json index 18e182a..9a1a035 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -10,7 +10,7 @@ "run_at": "document_end" } ], - "host_permissions": ["https://monster-siren.hypergryph.com/*"], + "host_permissions": ["https://monster-siren.hypergryph.com/*", "http://localhost:5173/*"], "icons": { "16": "vite.svg", "48": "vite.svg", @@ -19,5 +19,9 @@ "background": { "service_worker": "background.js" }, - "permissions": ["tabs", "webRequest"] + "permissions": ["tabs", "webRequest"], + "content_security_policy": { + "extension_pages": "default-src 'self'; script-src 'self' http://localhost:5173; style-src 'self' 'unsafe-inline'; connect-src 'self' ws://localhost:5173;", + "sandbox": "sandbox" + } } diff --git a/src/App.vue b/src/App.vue index 40d787c..67a24d8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,7 +3,7 @@