summaryrefslogtreecommitdiff
path: root/ext/js/pages/action-popup-main.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/pages/action-popup-main.js')
-rw-r--r--ext/js/pages/action-popup-main.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/js/pages/action-popup-main.js b/ext/js/pages/action-popup-main.js
index 2de986da..4934802b 100644
--- a/ext/js/pages/action-popup-main.js
+++ b/ext/js/pages/action-popup-main.js
@@ -103,6 +103,10 @@ class DisplayController {
let tab;
try {
tab = await this._getCurrentTab();
+ // Safari assigns a tab object to the popup, other browsers do not
+ if (tab && await this._isSafari()) {
+ tab = void 0;
+ }
} catch (e) {
// NOP
}
@@ -220,6 +224,11 @@ class DisplayController {
node.hidden = false;
}
}
+
+ async _isSafari() {
+ const {browser} = await yomichan.api.getEnvironmentInfo();
+ return browser === 'safari';
+ }
}
(async () => {