aboutsummaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/backend.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 4a3b7663..55905fab 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -100,8 +100,6 @@ class Backend {
['suspendAnkiCardsForNote', {async: true, contentScript: true, handler: this._onApiSuspendAnkiCardsForNote.bind(this)}],
['commandExec', {async: false, contentScript: true, handler: this._onApiCommandExec.bind(this)}],
['getExpressionAudioInfoList', {async: true, contentScript: true, handler: this._onApiGetExpressionAudioInfoList.bind(this)}],
- ['downloadDefinitionAudio', {async: true, contentScript: true, handler: this._onApiDownloadDefinitionAudio.bind(this)}],
- ['screenshotGet', {async: true, contentScript: true, handler: this._onApiScreenshotGet.bind(this)}],
['sendMessageToFrame', {async: false, contentScript: true, handler: this._onApiSendMessageToFrame.bind(this)}],
['broadcastTab', {async: false, contentScript: true, handler: this._onApiBroadcastTab.bind(this)}],
['frameInformationGet', {async: true, contentScript: true, handler: this._onApiFrameInformationGet.bind(this)}],
@@ -109,7 +107,6 @@ class Backend {
['getStylesheetContent', {async: true, contentScript: true, handler: this._onApiGetStylesheetContent.bind(this)}],
['getEnvironmentInfo', {async: false, contentScript: true, handler: this._onApiGetEnvironmentInfo.bind(this)}],
['clipboardGet', {async: true, contentScript: true, handler: this._onApiClipboardGet.bind(this)}],
- ['clipboardGetImage', {async: true, contentScript: true, handler: this._onApiClipboardImageGet.bind(this)}],
['getDisplayTemplatesHtml', {async: true, contentScript: true, handler: this._onApiGetDisplayTemplatesHtml.bind(this)}],
['getZoom', {async: true, contentScript: true, handler: this._onApiGetZoom.bind(this)}],
['getDefaultAnkiFieldTemplates', {async: false, contentScript: true, handler: this._onApiGetDefaultAnkiFieldTemplates.bind(this)}],
@@ -504,28 +501,6 @@ class Backend {
return await this._audioDownloader.getExpressionAudioInfoList(source, expression, reading, details);
}
- async _onApiDownloadDefinitionAudio({sources, expression, reading, details}) {
- return await this._downloadDefinitionAudio(sources, expression, reading, details);
- }
-
- _onApiScreenshotGet({options}, sender) {
- if (!(sender && sender.tab)) {
- return Promise.resolve();
- }
-
- const windowId = sender.tab.windowId;
- return new Promise((resolve, reject) => {
- chrome.tabs.captureVisibleTab(windowId, options, (dataUrl) => {
- const e = chrome.runtime.lastError;
- if (e) {
- reject(new Error(e.message));
- } else {
- resolve(dataUrl);
- }
- });
- });
- }
-
_onApiSendMessageToFrame({frameId: targetFrameId, action, params}, sender) {
if (!(sender && sender.tab)) {
return false;
@@ -572,10 +547,6 @@ class Backend {
return this._clipboardReader.getText();
}
- async _onApiClipboardImageGet() {
- return this._clipboardReader.getImage();
- }
-
async _onApiGetDisplayTemplatesHtml() {
return await this._fetchAsset('/mixed/display-templates.html');
}