This commit is contained in:
IndieKKY
2024-10-19 15:21:24 +08:00
parent cccf7e6149
commit cc732de8e6
3 changed files with 11 additions and 1 deletions

View File

@@ -51,6 +51,9 @@ node版本18.15.0
注:`./push.sh`是作者自用脚本,可以忽略。 注:`./push.sh`是作者自用脚本,可以忽略。
提示本地edge开发调试可能有问题会报csp错误本地开发调试推荐用chrome。
构建后应该正常关键是fix.cjs里将use_dynamic_url设置为false的这个操作。
## 贡献指南 ## 贡献指南
欢迎贡献代码或提出改进建议!如果您希望为该项目做出贡献,请遵循以下步骤: 欢迎贡献代码或提出改进建议!如果您希望为该项目做出贡献,请遵循以下步骤:

View File

@@ -5,4 +5,11 @@ const fs = require('fs')
//copy index.html to sidepanel.html //copy index.html to sidepanel.html
fs.copyFileSync('./dist/index.html', './dist/sidepanel.html') fs.copyFileSync('./dist/index.html', './dist/sidepanel.html')
//set all use_dynamic_url to false
const manifest = require('./dist/manifest.json')
manifest.web_accessible_resources.forEach(resource => {
resource.use_dynamic_url = false
})
fs.writeFileSync('./dist/manifest.json', JSON.stringify(manifest, null, 2))
console.log('fix.js done'); console.log('fix.js done');

View File

@@ -57,7 +57,7 @@ export default defineManifest(async (env) => ({
"resources": [ "resources": [
"index.html", "index.html",
], ],
"use_dynamic_url": true "use_dynamic_url": false
} }
] ]
})) }))