diff options
| author | MarvNC <rotrobmin@gmail.com> | 2023-11-03 11:59:21 -0700 | 
|---|---|---|
| committer | MarvNC <rotrobmin@gmail.com> | 2023-11-03 11:59:21 -0700 | 
| commit | ec62375c017f124570cf922647c530829714eee2 (patch) | |
| tree | accb3968e083f6e59a243b840d7859d61b3fae9e /ext/js/extension/environment.js | |
| parent | 5e10b67c500b7af9d5af6d98caae9734ebdf984d (diff) | |
| parent | b64f51c3b13a46af4dd7f1e43048ac19c781ca7b (diff) | |
Merge remote-tracking branch 'upstream/master' into update-dictionaries
Diffstat (limited to 'ext/js/extension/environment.js')
| -rw-r--r-- | ext/js/extension/environment.js | 16 | 
1 files changed, 6 insertions, 10 deletions
| diff --git a/ext/js/extension/environment.js b/ext/js/extension/environment.js index ec1e8612..ad5a19ae 100644 --- a/ext/js/extension/environment.js +++ b/ext/js/extension/environment.js @@ -31,8 +31,9 @@ class Environment {      }      async _loadEnvironmentInfo() { -        const browser = await this._getBrowser();          const os = await this._getOperatingSystem(); +        const browser = await this._getBrowser(os); +          return {              browser,              platform: {os} @@ -64,7 +65,7 @@ class Environment {          });      } -    async _getBrowser() { +    async _getBrowser(os) {          try {              if (chrome.runtime.getURL('/').startsWith('ms-browser-extension://')) {                  return 'edge-legacy'; @@ -76,17 +77,12 @@ class Environment {              // NOP          }          if (typeof browser !== 'undefined') { -            try { -                const info = await browser.runtime.getBrowserInfo(); -                if (info.name === 'Fennec') { -                    return 'firefox-mobile'; -                } -            } catch (e) { -                // NOP -            }              if (this._isSafari()) {                  return 'safari';              } +            if (os === 'android') { +                return 'firefox-mobile'; +            }              return 'firefox';          } else {              return 'chrome'; |