脚本注入逻辑
Some checks failed
test / Run tests (push) Failing after 7s
build / Build (push) Failing after 10s
Some checks failed
test / Run tests (push) Failing after 7s
build / Build (push) Failing after 10s
This commit is contained in:
parent
eea3b43e0b
commit
9ce1826a34
@ -194,25 +194,6 @@ export class RuntimeService {
|
||||
// 标记为已注册
|
||||
Cache.getInstance().set("registryScript:" + script.uuid, true);
|
||||
});
|
||||
console.log(registerScript);
|
||||
// 把脚本信息注入到USER_SCRIPT环境中
|
||||
chrome.userScripts.register([
|
||||
{
|
||||
id: "scriptinfo-" + scriptRes.uuid,
|
||||
js: [
|
||||
{
|
||||
code: compileInjectScriptInfo(
|
||||
await this.messageFlag(),
|
||||
scriptRes,
|
||||
await (await fetch("inject_script_info.js")).text()
|
||||
),
|
||||
},
|
||||
],
|
||||
matches: dealPatternMatches(matches),
|
||||
runAt: "document_start",
|
||||
world: "USER_SCRIPT",
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
unregistryPageScript(script: Script) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user