Maybe it already works under android.

:P
This commit is contained in:
Kevin Röbert 2018-01-25 22:37:02 +01:00
parent ff0efb8316
commit 22ed091bc6

View File

@ -17,7 +17,14 @@ var globalurlcounter;
var siteBlockedAlert = 'javascript:void(0)'; var siteBlockedAlert = 'javascript:void(0)';
var dataHash; var dataHash;
var localDataHash; var localDataHash;
var os;
/**
* Save OS Version
*/
browser.runtime.getPlatformInfo(function(info) {
os = info.os;
});
/** /**
* Initialize the JSON provider object keys. * Initialize the JSON provider object keys.
@ -632,7 +639,11 @@ function getLoggingStatus()
/** /**
* Call by each windows is closed or created. * 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); 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 * Call loadOldDataFromStore, getHash, counter, status and log functions
*/ */