From 681065e5549e3f6bf54e416120884481bded5b6e Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 8 Nov 2020 17:06:44 -0500 Subject: Remove unused functions from backend.js (#1014) --- ext/bg/js/backend.js | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'ext') diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 3f00994a..d1d25153 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -1255,11 +1255,6 @@ class Backend { return false; } - _getTemplates(options) { - const templates = options.anki.fieldTemplates; - return typeof templates === 'string' ? templates : this._defaultAnkiFieldTemplates; - } - async _getTabUrl(tabId) { try { const {url} = await this._sendMessageTabPromise( @@ -1462,23 +1457,6 @@ class Backend { return isValidTab ? tab : null; } - _environmentHasDocument() { - return (typeof document === 'object' && document !== null); - } - - _executePasteCommand() { - document.execCommand('paste'); - } - - _readFileAsDataURL(file) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onload = () => resolve(reader.result); - reader.onerror = () => reject(reader.error); - reader.readAsDataURL(file); - }); - } - async _getScreenshot(windowId, tabId, ownerFrameId, format, quality) { if (typeof windowId !== 'number') { throw new Error('Invalid window ID'); -- cgit v1.2.3