mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-16 22:25:36 +07:00
Maybe it already works under android.
:P
This commit is contained in:
26
clearurls.js
26
clearurls.js
@@ -17,7 +17,14 @@ var globalurlcounter;
|
||||
var siteBlockedAlert = 'javascript:void(0)';
|
||||
var dataHash;
|
||||
var localDataHash;
|
||||
var os;
|
||||
|
||||
/**
|
||||
* Save OS Version
|
||||
*/
|
||||
browser.runtime.getPlatformInfo(function(info) {
|
||||
os = info.os;
|
||||
});
|
||||
|
||||
/**
|
||||
* Initialize the JSON provider object keys.
|
||||
@@ -632,7 +639,11 @@ function getLoggingStatus()
|
||||
/**
|
||||
* Call by each windows is closed or created.
|
||||
*/
|
||||
if(!checkOSAndroid())
|
||||
{
|
||||
console.log("ClearURLs: Log listener is added.")
|
||||
browser.windows.onRemoved.addListener(saveLog);
|
||||
}
|
||||
browser.tabs.onCreated.addListener(saveLog);
|
||||
|
||||
/**
|
||||
@@ -666,6 +677,21 @@ function setBadgedStatus() {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if it is an android device.
|
||||
* @return bool
|
||||
*/
|
||||
function checkOSAndroid()
|
||||
{
|
||||
if(os == "android")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Call loadOldDataFromStore, getHash, counter, status and log functions
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user