summaryrefslogtreecommitdiff
path: root/ext/bg/js/api.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/api.js')
-rw-r--r--ext/bg/js/api.js30
1 files changed, 2 insertions, 28 deletions
diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js
index 82166007..49a6c14f 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -89,34 +89,8 @@ function apiInjectStylesheet(css, sender) {
return utilBackend()._onApiInjectStylesheet({css}, sender);
}
-async function apiGetEnvironmentInfo() {
- const browser = await _apiGetBrowser();
- const platform = await new Promise((resolve) => chrome.runtime.getPlatformInfo(resolve));
- return {
- browser,
- platform: {
- os: platform.os
- }
- };
-}
-
-async function _apiGetBrowser() {
- if (EXTENSION_IS_BROWSER_EDGE) {
- return 'edge';
- }
- if (typeof browser !== 'undefined') {
- try {
- const info = await browser.runtime.getBrowserInfo();
- if (info.name === 'Fennec') {
- return 'firefox-mobile';
- }
- } catch (e) {
- // NOP
- }
- return 'firefox';
- } else {
- return 'chrome';
- }
+function apiGetEnvironmentInfo() {
+ return utilBackend()._onApiGetEnvironmentInfo();
}
async function apiClipboardGet() {