- manifest content_scripts.matches 改为 http://localhost/* 与 http://127.0.0.1/*, 覆盖本机 Caddy(80/443) 与 Vite(5173) 等所有端口;此前只白名单 5173, 本地从 http://localhost/ 打开后台时内容脚本不加载,注入既不写 Cookie 也不跳转。 - background 的来源校验从「精确 origin 集合」改为「主机名集合」, 避免同一后台在不同端口下被判定为未授权来源。 - 版本升到 1.0.1;README 补充本地端口与重新构建/重新加载的说明。 - 后台页在扩展未检测到时展示常驻提示,并在点击注入时说明当前 origin、 构建与安装步骤,明确「不会写入也不会跳转」,不再静默无反应。
43 lines
899 B
JSON
43 lines
899 B
JSON
{
|
|
"manifest_version": 3,
|
|
"name": "半自动兑换助手",
|
|
"version": "1.0.1",
|
|
"description": "配合 order_site 后台使用:把所选虎牙/微博账号的登录态写入本机浏览器,兑换操作仍由人工完成。",
|
|
"permissions": [
|
|
"cookies",
|
|
"scripting",
|
|
"activeTab"
|
|
],
|
|
"host_permissions": [
|
|
"*://*.huya.com/*",
|
|
"*://huya.com/*",
|
|
"*://*.weibo.com/*",
|
|
"*://weibo.com/*",
|
|
"*://*.weibo.cn/*",
|
|
"*://*.sina.com.cn/*"
|
|
],
|
|
"content_scripts": [
|
|
{
|
|
"matches": [
|
|
"http://localhost/*",
|
|
"http://127.0.0.1/*"
|
|
],
|
|
"js": [
|
|
"relay.js"
|
|
],
|
|
"run_at": "document_start"
|
|
}
|
|
],
|
|
"background": {
|
|
"service_worker": "background.js"
|
|
},
|
|
"action": {
|
|
"default_title": "半自动兑换助手"
|
|
},
|
|
"icons": {
|
|
"16": "icon16.png",
|
|
"48": "icon48.png",
|
|
"128": "icon128.png"
|
|
}
|
|
}
|