diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-11-23 16:16:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 16:16:13 -0500 |
commit | ecc994a8bbd52a426434a549f8e3e68eba6e786e (patch) | |
tree | 9d8645373d0b9de9b4b0a790fe0b737fcc290131 /ext/js/background/backend.js | |
parent | cedf6b25c4327d33411877dbb412877dfa7753e9 (diff) |
ScriptManager updates (#2022)
* Fix spacing
* Add more parameters to injectStylesheet
* Add more parameters to injectScript
* Update ScriptManager to support content script registration
* Add webNavigation as an optional permission
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r-- | ext/js/background/backend.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index f48a87f8..db43ec57 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -564,7 +564,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); + return await this._scriptManager.injectStylesheet(type, value, tab.id, frameId, false, true, 'document_start'); } async _onApiGetStylesheetContent({url}) { @@ -2156,7 +2156,7 @@ class Backend { if (file === null) { return; } - await this._scriptManager.injectScript(file, tabId, frameId); + await this._scriptManager.injectScript(file, tabId, frameId, false, true, 'document_start'); } async _getNormalizedDictionaryDatabaseMedia(targets) { |