aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background/backend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-27 00:59:33 -0500
committerGitHub <noreply@github.com>2023-12-27 05:59:33 +0000
commit7cc20964b5ae69967945a802c4137be9052ea93b (patch)
tree0fb824d94045d1c424e99ccc510e342761e2a176 /ext/js/background/backend.js
parentff412d2010a41da47e37e86f0167452c2f9c72ca (diff)
Google docs fixes (#455)
* Simplify GoogleDocsUtil deferred import * Remove loadExtensionScripts
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r--ext/js/background/backend.js12
1 files changed, 0 insertions, 12 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index a4cf6949..765d17d9 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -189,7 +189,6 @@ export class Backend {
['textHasJapaneseCharacters', this._onApiTextHasJapaneseCharacters.bind(this)],
['getTermFrequencies', this._onApiGetTermFrequencies.bind(this)],
['findAnkiNotes', this._onApiFindAnkiNotes.bind(this)],
- ['loadExtensionScripts', this._onApiLoadExtensionScripts.bind(this)],
['openCrossFramePort', this._onApiOpenCrossFramePort.bind(this)]
]);
/* eslint-enable no-multi-spaces */
@@ -846,17 +845,6 @@ export class Backend {
return await this._anki.findNotes(query);
}
- /** @type {import('api').ApiHandler<'loadExtensionScripts'>} */
- async _onApiLoadExtensionScripts({files}, sender) {
- if (!sender || !sender.tab) { throw new Error('Invalid sender'); }
- const tabId = sender.tab.id;
- 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);
- }
- }
-
/** @type {import('api').ApiHandler<'openCrossFramePort'>} */
_onApiOpenCrossFramePort({targetTabId, targetFrameId}, sender) {
const sourceTabId = (sender && sender.tab ? sender.tab.id : null);