From 6ea89b6318c7c82ec661769d218e0807676e2417 Mon Sep 17 00:00:00 2001 From: kkapsner Date: Mon, 29 May 2023 21:41:42 +0200 Subject: [PATCH] Improve isMobile Fixes #658 --- lib/mobile.js | 4 ++++ releaseNotes.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/mobile.js b/lib/mobile.js index bb7269a..71b1c41 100644 --- a/lib/mobile.js +++ b/lib/mobile.js @@ -16,6 +16,10 @@ const settingDefinitions = require("./settingDefinitions"); scope.isMobile = async function isMobile(){ + const platformInfo = await browser.runtime.getPlatformInfo(); + if (platformInfo && platformInfo.os === "android"){ + return true; + } // todo: proper mobile check (e.g. over browser.runtime.getBrowserInfo()) and no feature check return !browser.pageAction || !browser.pageAction.show || diff --git a/releaseNotes.txt b/releaseNotes.txt index 554ff99..d26ec95 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -8,6 +8,7 @@ Version 1.10: fixes: - always protect about:blank - persistent rng not working in Firefox for Android + - mobile default settings were not used in Firefox for Android known issues: - if a data URL is blocked the page action button does not appear