diff options
Diffstat (limited to 'ext/mixed/js/environment.js')
-rw-r--r-- | ext/mixed/js/environment.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/mixed/js/environment.js b/ext/mixed/js/environment.js index 5bd84010..1f4038d2 100644 --- a/ext/mixed/js/environment.js +++ b/ext/mixed/js/environment.js @@ -67,8 +67,15 @@ class Environment { } async _getBrowser() { - if (EXTENSION_IS_BROWSER_EDGE) { - return 'edge'; + try { + if (chrome.runtime.getURL('/').startsWith('ms-browser-extension://')) { + return 'edge-legacy'; + } + if (/\bEdge?\//.test(navigator.userAgent)) { + return 'edge'; + } + } catch (e) { + // NOP } if (typeof browser !== 'undefined') { try { |