summaryrefslogtreecommitdiff
path: root/ext/bg/js/api.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/api.js')
-rw-r--r--ext/bg/js/api.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js
index db849cc5..3b9af593 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -74,14 +74,7 @@ function apiAudioGetUrl(definition, source, optionsContext) {
}
function apiScreenshotGet(options, sender) {
- if (!(sender && sender.tab)) {
- return Promise.resolve();
- }
-
- const windowId = sender.tab.windowId;
- return new Promise((resolve) => {
- chrome.tabs.captureVisibleTab(windowId, options, (dataUrl) => resolve(dataUrl));
- });
+ return utilBackend()._onApiScreenshotGet({options}, sender);
}
function apiForward(action, params, sender) {