diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-06-28 12:40:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-28 12:40:02 -0400 |
commit | 7b5dd5c310f7ec4d7f6e329367d34258cce10e8e (patch) | |
tree | 00151155ea5f3dc438c9230e485a72613a41d00f /ext/mixed/js/environment.js | |
parent | cdf191336aa616a206b977ba3beeb1233cf41c32 (diff) |
Update browser compatibility and Edge detection (#629)
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 { |