mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-15 21:55:36 +07:00
Fixed counter issue
Fixed https://github.com/ClearURLs/Addon/issues/234
This commit is contained in:
@@ -114,7 +114,7 @@ function checkLocalURL(url) {
|
||||
* @return {int} Number of Parameters
|
||||
*/
|
||||
function countFields(url) {
|
||||
return new URL(url).searchParams.entries.length;
|
||||
return [...new URL(url).searchParams].length
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,23 +158,23 @@ function loadOldDataFromStore() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Increase by {number} the GlobalURLCounter
|
||||
* Increase by {number} the total counter
|
||||
* @param {int} number
|
||||
*/
|
||||
function increaseGlobalURLCounter(number) {
|
||||
function increaseTotalCounter(number) {
|
||||
if (storage.statisticsStatus) {
|
||||
storage.globalurlcounter += number;
|
||||
deferSaveOnDisk('globalurlcounter');
|
||||
storage.totalCounter += number;
|
||||
deferSaveOnDisk('totalCounter');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Increase by one the URLCounter
|
||||
* Increase by one the cleaned counter
|
||||
*/
|
||||
function increaseURLCounter() {
|
||||
function increaseCleanedCounter() {
|
||||
if (storage.statisticsStatus) {
|
||||
storage.globalCounter++;
|
||||
deferSaveOnDisk('globalCounter');
|
||||
storage.cleanedCounter++;
|
||||
deferSaveOnDisk('cleanedCounter');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user