diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/js/extension/environment.js | 16 | ||||
-rw-r--r-- | ext/permissions.html | 4 | ||||
-rw-r--r-- | ext/settings.html | 2 |
3 files changed, 9 insertions, 13 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'; diff --git a/ext/permissions.html b/ext/permissions.html index f6956cd7..376a9de5 100644 --- a/ext/permissions.html +++ b/ext/permissions.html @@ -94,9 +94,9 @@ <label class="toggle"><input type="checkbox" class="permissions-toggle" data-required-permissions="clipboardRead"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label> </div> </div></div> - <div class="settings-item"><div class="settings-item-inner"> + <div class="settings-item" data-hide-for-browser="firefox-mobile"><div class="settings-item-inner"> <div class="settings-item-left"> - <div class="settings-item-label"><code>nativeMessaging</code> <span class="light" data-show-for-browser="chrome edge">(optional)</span></div> + <div class="settings-item-label"><code>nativeMessaging</code> <span class="light">(optional)</span></div> <div class="settings-item-description"> Yomitan has the ability to communicate with an optional native messaging component in order to support parsing large blocks of Japanese text using diff --git a/ext/settings.html b/ext/settings.html index f1001f90..8d5f0a76 100644 --- a/ext/settings.html +++ b/ext/settings.html @@ -1372,7 +1372,7 @@ </p> </div> </div> - <div class="settings-item advanced-only"> + <div class="settings-item advanced-only" data-hide-for-browser="firefox-mobile"> <div class="settings-item-inner"> <div class="settings-item-left"> <div class="settings-item-invalid-indicator"></div> |