summaryrefslogtreecommitdiff
path: root/ext/js/background/backend.js
diff options
context:
space:
mode:
authorpraschke <stel@comfy.monster>2023-08-16 11:37:13 +0100
committerpraschke <stel@comfy.monster>2023-08-17 14:17:18 +0100
commit4b7f91fa5f43ba6023f1c9991348b56b3e26a11b (patch)
tree5cec40168436308445f1f58fa8bae14218d0f7be /ext/js/background/backend.js
parent6c21818eba54b9c5191845086bec28e4a548ee3b (diff)
fix script and style injection in Firefox
Firefox added the scripting API in 102. This should fix the majority of warnings listed in #96: - insertCSS - executeScript - getRegisteredContentScripts - contentScripts.register - registerContentScripts - unregisterContentScripts
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r--ext/js/background/backend.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index db6cfada..dd233abb 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -593,7 +593,7 @@ class Backend {
async _onApiInjectStylesheet({type, value}, sender) {
const {frameId, tab} = sender;
if (!isObject(tab)) { throw new Error('Invalid tab'); }
- return await this._scriptManager.injectStylesheet(type, value, tab.id, frameId, false, true, 'document_start');
+ return await this._scriptManager.injectStylesheet(type, value, tab.id, frameId, false);
}
async _onApiGetStylesheetContent({url}) {
@@ -790,7 +790,7 @@ class Backend {
if (typeof tabId !== 'number') { throw new Error('Sender has invalid tab ID'); }
const {frameId} = sender;
for (const file of files) {
- await this._scriptManager.injectScript(file, tabId, frameId, false, true, 'document_start');
+ await this._scriptManager.injectScript(file, tabId, frameId, false);
}
}