parent
08fe25dc0d
commit
50542fa6a3
|
@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.11.0] - 2020-01-06
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Added hyperlink auditing blocking [#184](https://gitlab.com/KevinRoebert/ClearUrls/issues/184)
|
||||||
|
|
||||||
|
### Compatibility note
|
||||||
|
- Require Firefox >= 55
|
||||||
|
- Require Chrome >= 22
|
||||||
|
|
||||||
## [1.10.0] - 2020-01-03
|
## [1.10.0] - 2020-01-03
|
||||||
|
|
||||||
### Compatibility note
|
### Compatibility note
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
"message": "Diese Domain wurde blockiert",
|
"message": "Diese Domain wurde blockiert",
|
||||||
"description": "Diese Zeichenfolge wird für blockierte Domäns im ClearURL-Protokoll verwendet."
|
"description": "Diese Zeichenfolge wird für blockierte Domäns im ClearURL-Protokoll verwendet."
|
||||||
},
|
},
|
||||||
|
"log_ping_blocked": {
|
||||||
|
"message": "Diese Hyperlink Auditing Anfrage wurde blockiert",
|
||||||
|
"description": "Diese Zeichenfolge wird für blockierte Hyperlink Auditing Anfragen im ClearURL-Protokoll verwendet."
|
||||||
|
},
|
||||||
"check_os_log": {
|
"check_os_log": {
|
||||||
"message": "[ClearURLs]: Protokoll-Listener wurde hinzugefügt.",
|
"message": "[ClearURLs]: Protokoll-Listener wurde hinzugefügt.",
|
||||||
"description": "Diese Zeichenfolge wird beim Start des ClearURL-Protokolls verwendet."
|
"description": "Diese Zeichenfolge wird beim Start des ClearURL-Protokolls verwendet."
|
||||||
|
@ -312,5 +316,13 @@
|
||||||
"domain_blocking_enabled_title": {
|
"domain_blocking_enabled_title": {
|
||||||
"message": "Erlaube Domain-Blocking (Kann zu Problemen auf Seiten führen, die AdBlocker nicht erlauben)",
|
"message": "Erlaube Domain-Blocking (Kann zu Problemen auf Seiten führen, die AdBlocker nicht erlauben)",
|
||||||
"description": "Diese Zeichenkette wird als Titel für das Domain-Blocking verwendet."
|
"description": "Diese Zeichenkette wird als Titel für das Domain-Blocking verwendet."
|
||||||
|
},
|
||||||
|
"ping_blocking_enabled": {
|
||||||
|
"message": "Blockiere Hyperlink Auditing Anfragen (Siehe auch <a href='https://html.spec.whatwg.org/multipage/links.html#hyperlink-auditing' target='_blank'>diese Spezifikation</a>)",
|
||||||
|
"description": "Diese Zeichenkette wird als Beschreibung für das Hyperlink Auditing-Blocking verwendet."
|
||||||
|
},
|
||||||
|
"ping_blocking_enabled_title": {
|
||||||
|
"message": "Blockiere Hyperlink Auditing Anfragen",
|
||||||
|
"description": "Diese Zeichenkette wird als Titel für das Hyperlink Auditing-Blocking verwendet."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
"message": "This domain is blocked",
|
"message": "This domain is blocked",
|
||||||
"description": "This string is used on blocked domains in the ClearURLs log."
|
"description": "This string is used on blocked domains in the ClearURLs log."
|
||||||
},
|
},
|
||||||
|
"log_ping_blocked": {
|
||||||
|
"message": "This hyperlink auditing was blocked",
|
||||||
|
"description": "This string is used on hyperlink auditing in the ClearURLs log."
|
||||||
|
},
|
||||||
"check_os_log": {
|
"check_os_log": {
|
||||||
"message": "[ClearURLs]: Log listener is added.",
|
"message": "[ClearURLs]: Log listener is added.",
|
||||||
"description": "This string is used on ClearURLs log startup."
|
"description": "This string is used on ClearURLs log startup."
|
||||||
|
@ -312,5 +316,13 @@
|
||||||
"domain_blocking_enabled_title": {
|
"domain_blocking_enabled_title": {
|
||||||
"message": "Allow domain blocking (Can lead to problems on pages that do not allow AdBlockers)",
|
"message": "Allow domain blocking (Can lead to problems on pages that do not allow AdBlockers)",
|
||||||
"description": "This string is used as title for the domain blocking switch"
|
"description": "This string is used as title for the domain blocking switch"
|
||||||
|
},
|
||||||
|
"ping_blocking_enabled": {
|
||||||
|
"message": "Block hyperlink auditing (See also <a href='https://html.spec.whatwg.org/multipage/links.html#hyperlink-auditing' target='_blank'>this article</a>)",
|
||||||
|
"description": "This string is used as label for the hyperlink auditing blocking switch"
|
||||||
|
},
|
||||||
|
"ping_blocking_enabled_title": {
|
||||||
|
"message": "Block hyperlink auditing",
|
||||||
|
"description": "This string is used as title for the hyperlink auditing blocking switch"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
74
clearurls.js
74
clearurls.js
|
@ -70,20 +70,7 @@ function removeFieldsFormURL(provider, pureUrl, quiet = false) {
|
||||||
pushToLog(beforeReplace, url, rawRule);
|
pushToLog(beforeReplace, url, rawRule);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (badges[tabid] == null) badges[tabid] = 0;
|
increaseBadged(quiet);
|
||||||
|
|
||||||
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});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
changes = true;
|
changes = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -144,20 +131,7 @@ function removeFieldsFormURL(provider, pureUrl, quiet = false) {
|
||||||
if (!quiet) pushToLog(tempBeforeURL, tempURL, rule);
|
if (!quiet) pushToLog(tempBeforeURL, tempURL, rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (badges[tabid] == null) badges[tabid] = 0;
|
increaseBadged(quiet);
|
||||||
|
|
||||||
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});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
changes = true;
|
changes = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -172,22 +146,7 @@ function removeFieldsFormURL(provider, pureUrl, quiet = false) {
|
||||||
|
|
||||||
if (provider.isCaneling() && storage.domainBlocking) {
|
if (provider.isCaneling() && storage.domainBlocking) {
|
||||||
if (!quiet) pushToLog(pureUrl, pureUrl, translate('log_domain_blocked'));
|
if (!quiet) pushToLog(pureUrl, pureUrl, translate('log_domain_blocked'));
|
||||||
if (badges[tabid] == null) {
|
increaseBadged(quiet);
|
||||||
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});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
cancel = true;
|
cancel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -598,6 +557,12 @@ function start() {
|
||||||
"cancel": false
|
"cancel": false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(storage.pingBlocking && storage.pingRequestTypes.includes(request.type)) {
|
||||||
|
pushToLog(request.url, request.url, translate('log_ping_blocked'));
|
||||||
|
increaseBadged();
|
||||||
|
return {cancel: true};
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Call for every provider the removeFieldsFormURL method.
|
* Call for every provider the removeFieldsFormURL method.
|
||||||
*/
|
*/
|
||||||
|
@ -726,7 +691,7 @@ function start() {
|
||||||
*/
|
*/
|
||||||
browser.webRequest.onBeforeRequest.addListener(
|
browser.webRequest.onBeforeRequest.addListener(
|
||||||
promise,
|
promise,
|
||||||
{urls: ["<all_urls>"], types: getData("types")},
|
{urls: ["<all_urls>"], types: getData("types").concat(getData("pingRequestTypes"))},
|
||||||
["blocking"]
|
["blocking"]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -761,3 +726,22 @@ function pushToLog(beforeProcessing, afterProcessing, rule) {
|
||||||
deferSaveOnDisk('log');
|
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});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -114,12 +114,14 @@ function getData()
|
||||||
.then(() => loadData("localHostsSkipping"))
|
.then(() => loadData("localHostsSkipping"))
|
||||||
.then(() => loadData("referralMarketing"))
|
.then(() => loadData("referralMarketing"))
|
||||||
.then(() => loadData("domainBlocking"))
|
.then(() => loadData("domainBlocking"))
|
||||||
|
.then(() => loadData("pingBlocking"))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
changeSwitchButton("localHostsSkipping", "localHostsSkipping");
|
changeSwitchButton("localHostsSkipping", "localHostsSkipping");
|
||||||
changeSwitchButton("historyListenerEnabled", "historyListenerEnabled");
|
changeSwitchButton("historyListenerEnabled", "historyListenerEnabled");
|
||||||
changeSwitchButton("contextMenuEnabled", "contextMenuEnabled");
|
changeSwitchButton("contextMenuEnabled", "contextMenuEnabled");
|
||||||
changeSwitchButton("referralMarketing", "referralMarketing");
|
changeSwitchButton("referralMarketing", "referralMarketing");
|
||||||
changeSwitchButton("domainBlocking", "domainBlocking");
|
changeSwitchButton("domainBlocking", "domainBlocking");
|
||||||
|
changeSwitchButton("pingBlocking", "pingBlocking");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,6 +187,8 @@ function setText()
|
||||||
$('#importSettings').prop('title', translate('setting_html_import_button_title'));
|
$('#importSettings').prop('title', translate('setting_html_import_button_title'));
|
||||||
injectText("referral_marketing_enabled", "referral_marketing_enabled");
|
injectText("referral_marketing_enabled", "referral_marketing_enabled");
|
||||||
injectText("domain_blocking_enabled", "domain_blocking_enabled");
|
injectText("domain_blocking_enabled", "domain_blocking_enabled");
|
||||||
|
$('#ping_blocking_enabled').html(translate('ping_blocking_enabled'))
|
||||||
|
.prop('title', translate('ping_blocking_enabled_title'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -209,11 +209,14 @@ function initSettings() {
|
||||||
storage.referralMarketing = false;
|
storage.referralMarketing = false;
|
||||||
storage.logLimit = -1;
|
storage.logLimit = -1;
|
||||||
storage.domainBlocking = true;
|
storage.domainBlocking = true;
|
||||||
|
storage.pingBlocking = true;
|
||||||
|
|
||||||
if (getBrowser() === "Firefox") {
|
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.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") {
|
} else if (getBrowser() === "Chrome") {
|
||||||
storage.types = ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "other"];
|
storage.types = ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "other"];
|
||||||
|
storage.pingRequestTypes = ["ping"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ function decodeURL(url) {
|
||||||
return rtn;
|
return rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Gets the value of at `key` an object. If the resolved value is `undefined`, the `defaultValue` is returned in its place.
|
* 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
|
* @param {string} key the key of the object
|
||||||
|
|
|
@ -95,7 +95,8 @@
|
||||||
"uact",
|
"uact",
|
||||||
"aqs",
|
"aqs",
|
||||||
"sourceid",
|
"sourceid",
|
||||||
"sxsrf"
|
"sxsrf",
|
||||||
|
"rlz"
|
||||||
],
|
],
|
||||||
"referralMarketing": [
|
"referralMarketing": [
|
||||||
"referrer"
|
"referrer"
|
||||||
|
@ -184,7 +185,8 @@
|
||||||
"(%3F)?cmpid",
|
"(%3F)?cmpid",
|
||||||
"(%3F)?os_ehash",
|
"(%3F)?os_ehash",
|
||||||
"(%3F)?_ga",
|
"(%3F)?_ga",
|
||||||
"(%3F)?__twitter_impression"
|
"(%3F)?__twitter_impression",
|
||||||
|
"(%3F)?wt_mc"
|
||||||
],
|
],
|
||||||
"referralMarketing": [],
|
"referralMarketing": [],
|
||||||
"rawRules": [],
|
"rawRules": [],
|
||||||
|
@ -1105,6 +1107,44 @@
|
||||||
"exceptions": [],
|
"exceptions": [],
|
||||||
"redirections": [],
|
"redirections": [],
|
||||||
"forceRedirection": false
|
"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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,6 +98,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
<br />
|
||||||
<p>
|
<p>
|
||||||
<label id="rule_url_label"></label><br />
|
<label id="rule_url_label"></label><br />
|
||||||
<input type="url" id="ruleURL" value="" name="ruleURL" class="form-control" />
|
<input type="url" id="ruleURL" value="" name="ruleURL" class="form-control" />
|
||||||
|
@ -125,7 +126,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<span class="slider round"></span>
|
<span class="slider round"></span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<br />
|
|
||||||
<p>
|
<p>
|
||||||
<label id="local_hosts_skipping" style="font-weight: bold;"></label><br />
|
<label id="local_hosts_skipping" style="font-weight: bold;"></label><br />
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
|
@ -133,7 +133,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<span class="slider round"></span>
|
<span class="slider round"></span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<br />
|
|
||||||
<p>
|
<p>
|
||||||
<label id="history_listener_enabled" style="font-weight: bold;"></label><br />
|
<label id="history_listener_enabled" style="font-weight: bold;"></label><br />
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
|
@ -141,7 +140,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<span class="slider round"></span>
|
<span class="slider round"></span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<br />
|
|
||||||
<p>
|
<p>
|
||||||
<label id="context_menu_enabled" style="font-weight: bold;"></label><br />
|
<label id="context_menu_enabled" style="font-weight: bold;"></label><br />
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
|
@ -149,7 +147,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<span class="slider round"></span>
|
<span class="slider round"></span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<br />
|
|
||||||
<p>
|
<p>
|
||||||
<label id="referral_marketing_enabled" style="font-weight: bold;"></label><br />
|
<label id="referral_marketing_enabled" style="font-weight: bold;"></label><br />
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
|
@ -157,6 +154,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<span class="slider round"></span>
|
<span class="slider round"></span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<label id="ping_blocking_enabled" style="font-weight: bold;"></label><br />
|
||||||
|
<label class="switch">
|
||||||
|
<input type="checkbox" id="pingBlocking">
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
<br />
|
<br />
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<button type="button" id="save_settings_btn"
|
<button type="button" id="save_settings_btn"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "ClearURLs",
|
"name": "ClearURLs",
|
||||||
"version": "1.10.0",
|
"version": "1.11.0",
|
||||||
"author": "Kevin Röbert",
|
"author": "Kevin Röbert",
|
||||||
"description": "Remove tracking elements from URLs.",
|
"description": "Remove tracking elements from URLs.",
|
||||||
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
|
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user