From 7cc20964b5ae69967945a802c4137be9052ea93b Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 27 Dec 2023 00:59:33 -0500 Subject: Google docs fixes (#455) * Simplify GoogleDocsUtil deferred import * Remove loadExtensionScripts --- ext/js/background/backend.js | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'ext/js/background') 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); -- cgit v1.2.3