2020-01-02 15:43:24 -05:00
|
|
|
var android = false;
|
2019-11-25 20:19:44 -05:00
|
|
|
|
|
|
|
var gettingInfo = browser.runtime.getPlatformInfo();
|
|
|
|
gettingInfo.then(got => {
|
|
|
|
if (got.os == "android") {
|
|
|
|
console.log("Running in Android detected");
|
|
|
|
android = true;
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
console.log("Running in Desktop detected");
|
2019-12-24 22:21:04 -05:00
|
|
|
android = false;
|
2019-11-25 20:19:44 -05:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2019-10-06 22:11:23 -04:00
|
|
|
function isDroid() {
|
2019-12-24 22:21:04 -05:00
|
|
|
console.log("android?", android);
|
|
|
|
if (android == undefined) {
|
|
|
|
return false;
|
|
|
|
}
|
2019-11-25 20:19:44 -05:00
|
|
|
return android;
|
2019-10-06 22:11:23 -04:00
|
|
|
}
|
2019-12-24 23:08:35 -05:00
|
|
|
|
2019-12-24 23:14:01 -05:00
|
|
|
function notClosable() {
|
2019-12-24 23:25:35 -05:00
|
|
|
return false;
|
2019-12-24 23:08:35 -05:00
|
|
|
}
|