1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 04:40:20 +01:00

Improve isMobile

Fixes #658
This commit is contained in:
kkapsner 2023-05-29 21:41:42 +02:00
parent 02dfa8bd1b
commit 6ea89b6318
2 changed files with 5 additions and 0 deletions

View File

@ -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 ||

View File

@ -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