"], types: getData("types").concat(getData("pingRequestTypes"))},
["blocking"]
);
}
@@ -761,3 +726,22 @@ function pushToLog(beforeProcessing, afterProcessing, rule) {
deferSaveOnDisk('log');
}
}
+
+/**
+ * Increases the badged by one.
+ */
+function increaseBadged(quiet = false) {
+ if (badges[tabid] == null) badges[tabid] = 0;
+
+ if (!quiet) increaseURLCounter();
+
+ checkOSAndroid().then((res) => {
+ if (!res) {
+ if (storage.badgedStatus && !quiet) {
+ browser.browserAction.setBadgeText({text: (++badges[tabid]).toString(), tabId: tabid});
+ } else {
+ browser.browserAction.setBadgeText({text: "", tabId: tabid});
+ }
+ }
+ });
+}
diff --git a/core_js/settings.js b/core_js/settings.js
index ed08818..3189883 100644
--- a/core_js/settings.js
+++ b/core_js/settings.js
@@ -114,12 +114,14 @@ function getData()
.then(() => loadData("localHostsSkipping"))
.then(() => loadData("referralMarketing"))
.then(() => loadData("domainBlocking"))
+ .then(() => loadData("pingBlocking"))
.then(() => {
changeSwitchButton("localHostsSkipping", "localHostsSkipping");
changeSwitchButton("historyListenerEnabled", "historyListenerEnabled");
changeSwitchButton("contextMenuEnabled", "contextMenuEnabled");
changeSwitchButton("referralMarketing", "referralMarketing");
changeSwitchButton("domainBlocking", "domainBlocking");
+ changeSwitchButton("pingBlocking", "pingBlocking");
});
}
@@ -185,6 +187,8 @@ function setText()
$('#importSettings').prop('title', translate('setting_html_import_button_title'));
injectText("referral_marketing_enabled", "referral_marketing_enabled");
injectText("domain_blocking_enabled", "domain_blocking_enabled");
+ $('#ping_blocking_enabled').html(translate('ping_blocking_enabled'))
+ .prop('title', translate('ping_blocking_enabled_title'));
}
/**
diff --git a/core_js/storage.js b/core_js/storage.js
index 7556a28..21bcd1b 100644
--- a/core_js/storage.js
+++ b/core_js/storage.js
@@ -209,11 +209,14 @@ function initSettings() {
storage.referralMarketing = false;
storage.logLimit = -1;
storage.domainBlocking = true;
+ storage.pingBlocking = true;
if (getBrowser() === "Firefox") {
storage.types = ["font", "image", "imageset", "main_frame", "media", "object", "object_subrequest", "other", "script", "stylesheet", "sub_frame", "websocket", "xbl", "xml_dtd", "xmlhttprequest", "xslt"];
+ storage.pingRequestTypes = ["ping", "beacon"];
} else if (getBrowser() === "Chrome") {
storage.types = ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "other"];
+ storage.pingRequestTypes = ["ping"];
}
}
diff --git a/core_js/tools.js b/core_js/tools.js
index 5e7af9d..6e53e92 100644
--- a/core_js/tools.js
+++ b/core_js/tools.js
@@ -293,7 +293,7 @@ function decodeURL(url) {
return rtn;
}
-/*
+/**
* Gets the value of at `key` an object. If the resolved value is `undefined`, the `defaultValue` is returned in its place.
*
* @param {string} key the key of the object
diff --git a/data/data.min.json b/data/data.min.json
index df4aa15..3baddac 100644
--- a/data/data.min.json
+++ b/data/data.min.json
@@ -95,7 +95,8 @@
"uact",
"aqs",
"sourceid",
- "sxsrf"
+ "sxsrf",
+ "rlz"
],
"referralMarketing": [
"referrer"
@@ -184,7 +185,8 @@
"(%3F)?cmpid",
"(%3F)?os_ehash",
"(%3F)?_ga",
- "(%3F)?__twitter_impression"
+ "(%3F)?__twitter_impression",
+ "(%3F)?wt_mc"
],
"referralMarketing": [],
"rawRules": [],
@@ -1105,6 +1107,44 @@
"exceptions": [],
"redirections": [],
"forceRedirection": false
+ },
+ "disq.us": {
+ "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(disq)(\\.us).*",
+ "completeProvider": false,
+ "rules": [
+ "cuid"
+ ],
+ "referralMarketing": [],
+ "rawRules": [],
+ "exceptions": [],
+ "redirections": [
+ ".*url=([^&]*)"
+ ],
+ "forceRedirection": false
+ },
+ "liberation.fr": {
+ "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(liberation)(\\.fr).*",
+ "completeProvider": false,
+ "rules": [
+ "Echobox"
+ ],
+ "referralMarketing": [],
+ "rawRules": [],
+ "exceptions": [],
+ "redirections": [],
+ "forceRedirection": false
+ },
+ "anonym.to": {
+ "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(anonym)(\\.to).*",
+ "completeProvider": false,
+ "rules": [],
+ "referralMarketing": [],
+ "rawRules": [],
+ "exceptions": [],
+ "redirections": [
+ ".*\\?([^&]*)"
+ ],
+ "forceRedirection": false
}
}
}
diff --git a/html/settings.html b/html/settings.html
index 967c551..1bd4c35 100644
--- a/html/settings.html
+++ b/html/settings.html
@@ -98,6 +98,7 @@ along with this program. If not, see .
+
@@ -125,7 +126,6 @@ along with this program. If not, see .
-
-
-
-
+
+
+
+