1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02: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 ||