diff --git a/common.js b/common.js index f7aabb7..e9e5583 100644 --- a/common.js +++ b/common.js @@ -21,9 +21,11 @@ chrome.storage.local.get(prefs, ps => { ts.forEach(t => tabs[t.id] = t.windowId); ua.update(); }); - chrome.browserAction.setBadgeBackgroundColor({ - color: prefs.color - }); + if (chrome.browserAction.setBadgeBackgroundColor) { // FF for Android + chrome.browserAction.setBadgeBackgroundColor({ + color: prefs.color + }); + } }); chrome.storage.onChanged.addListener(ps => { Object.keys(ps).forEach(key => prefs[key] = ps[key].newValue); @@ -127,7 +129,9 @@ User-Agent String: ${prefs.mode === 'custom' ? custom : str || navigator.userAge } }; // make sure to clean on window removal -chrome.windows.onRemoved.addListener(windowId => delete ua._obj[windowId]); +if (chrome.windows) { // FF on Android + chrome.windows.onRemoved.addListener(windowId => delete ua._obj[windowId]); +} function hostname(url) { const s = url.indexOf('//') + 2; diff --git a/data/popup/index.css b/data/popup/index.css index 0019eb4..a8d1597 100644 --- a/data/popup/index.css +++ b/data/popup/index.css @@ -181,3 +181,8 @@ select { #explore:not([data-loaded="true"]) { height: 16px; } + +body[data-android="true"] [data-cmd="reload"], +body[data-android="true"] [data-cmd="window"] { + display: none; +} diff --git a/data/popup/index.html b/data/popup/index.html index eae5093..b7d40ab 100644 --- a/data/popup/index.html +++ b/data/popup/index.html @@ -3,6 +3,7 @@
+