summaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 4e6c59df..f9322959 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -542,6 +542,15 @@ class Backend {
return new Promise((resolve, reject) => {
const tabId = sender.tab.id;
+ if (!(
+ chrome.tabs !== null &&
+ typeof chrome.tabs === 'object' &&
+ typeof chrome.tabs.getZoom === 'function'
+ )) {
+ // Not supported
+ resolve({zoomFactor: 1.0});
+ return;
+ }
chrome.tabs.getZoom(tabId, (zoomFactor) => {
const e = chrome.runtime.lastError;
if (e) {