Maybe it already works under android.
:P
This commit is contained in:
parent
ff0efb8316
commit
22ed091bc6
28
clearurls.js
28
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.
|
||||
*/
|
||||
browser.windows.onRemoved.addListener(saveLog);
|
||||
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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user