summaryrefslogtreecommitdiff
path: root/ext/js/background
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-29 00:01:11 -0500
committerGitHub <noreply@github.com>2023-12-29 05:01:11 +0000
commit0a68020771fc5b9dd437a90d5aac5e8a0c66719b (patch)
tree48a0c4c25977343dd15da06e19807f332ca62ddb /ext/js/background
parentd90d408279938d389019a8bed15c5eb95af7c8bc (diff)
Fix google docs (#473)
* Add support for content script execution world * Update manifest version to support world parameter in Chromium browsers * Update google docs injection * Reuse code for registration * Add info
Diffstat (limited to 'ext/js/background')
-rw-r--r--ext/js/background/script-manager.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/js/background/script-manager.js b/ext/js/background/script-manager.js
index 1142121f..353c50e3 100644
--- a/ext/js/background/script-manager.js
+++ b/ext/js/background/script-manager.js
@@ -129,7 +129,7 @@ export async function unregisterContentScript(id) {
* @returns {chrome.scripting.RegisteredContentScript}
*/
function createContentScriptRegistrationOptions(details, id) {
- const {css, js, allFrames, matches, runAt} = details;
+ const {css, js, allFrames, matches, runAt, world} = details;
/** @type {chrome.scripting.RegisteredContentScript} */
const options = {
id: id,
@@ -150,5 +150,8 @@ function createContentScriptRegistrationOptions(details, id) {
if (typeof runAt !== 'undefined') {
options.runAt = runAt;
}
+ if (typeof world !== 'undefined') {
+ options.world = world;
+ }
return options;
}