注入脚本和inject/content通信
Some checks failed
build / Build (push) Failing after 6s
test / Run tests (push) Failing after 2s
Some checks failed
build / Build (push) Failing after 6s
test / Run tests (push) Failing after 2s
This commit is contained in:
@ -9,3 +9,16 @@ export function isExtensionRequest(details: chrome.webRequest.ResourceRequest &
|
||||
export function dealMatches(matches: string[]) {
|
||||
return matches;
|
||||
}
|
||||
|
||||
export function getRunAt(runAts: string[]): chrome.userScripts.RunAt {
|
||||
if (runAts.length === 0) {
|
||||
return "document_idle";
|
||||
}
|
||||
const runAt = runAts[0];
|
||||
if (runAt === "document-start") {
|
||||
return "document_start";
|
||||
} else if (runAt === "document-end") {
|
||||
return "document_end";
|
||||
}
|
||||
return "document_idle";
|
||||
}
|
||||
|
Reference in New Issue
Block a user