mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-16 14:15:36 +07:00
Version 1.9.0
- Added #284 - Added #56 - Fixed #241 - Possible fix & workaround for #203 - Fixed bug in "history tracking injection protection". This option was not disabled, when the global filter switch are on off - Added an option to im-/export the log (requires the `downloads` permission) - Added an option to im-/export the settings (requires the `downloads` permission) - Added information page for blocked sites, when they are called in the `main_frame` - Added "multiple times URL encodes" recognition - Refactoring - Changed background script loading sequence to prevent that required functions are not yet loaded.
This commit is contained in:
@@ -19,20 +19,23 @@
|
||||
/*jshint esversion: 6 */
|
||||
|
||||
/**
|
||||
* Cleans given links. Also do automatic redirection.
|
||||
*
|
||||
* @param {[type]} url url as string
|
||||
* @return {Array} redirectUrl or none
|
||||
*/
|
||||
function pureCleaning(url) {
|
||||
var cleanURL = url;
|
||||
var URLbeforeReplaceCount = countFields(url);
|
||||
* Cleans given links. Also do automatic redirection.
|
||||
*
|
||||
* @param {String} url url as string
|
||||
* @param {boolean} quiet if the action should be displayed in log and statistics
|
||||
* @return {String} redirectUrl or none
|
||||
*/
|
||||
function pureCleaning(url, quiet = false) {
|
||||
let cleanURL = url;
|
||||
const URLbeforeReplaceCount = countFields(url);
|
||||
|
||||
//Add Fields form Request to global url counter
|
||||
increaseGlobalURLCounter(URLbeforeReplaceCount);
|
||||
if(!quiet) {
|
||||
//Add Fields form Request to global url counter
|
||||
increaseGlobalURLCounter(URLbeforeReplaceCount);
|
||||
}
|
||||
|
||||
for (var i = 0; i < providers.length; i++) {
|
||||
var result = {
|
||||
for (let i = 0; i < providers.length; i++) {
|
||||
let result = {
|
||||
"changes": false,
|
||||
"url": "",
|
||||
"redirect": false,
|
||||
@@ -41,7 +44,7 @@ function pureCleaning(url) {
|
||||
|
||||
if(providers[i].matchURL(cleanURL))
|
||||
{
|
||||
result = removeFieldsFormURL(providers[i], cleanURL);
|
||||
result = removeFieldsFormURL(providers[i], cleanURL, quiet);
|
||||
cleanURL = result.url;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user