parent
e58acecf7e
commit
06a8665688
49
clearurls.js
49
clearurls.js
|
@ -340,8 +340,6 @@ function start(items)
|
||||||
var changes = false;
|
var changes = false;
|
||||||
var cancel = false;
|
var cancel = false;
|
||||||
|
|
||||||
if(provider.matchURL(url))
|
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* Expand the url by provider redirections. So no tracking on
|
* Expand the url by provider redirections. So no tracking on
|
||||||
* url redirections form sites to sites.
|
* url redirections form sites to sites.
|
||||||
|
@ -419,12 +417,8 @@ function start(items)
|
||||||
"url": url,
|
"url": url,
|
||||||
"cancel": cancel
|
"cancel": cancel
|
||||||
};
|
};
|
||||||
}
|
|
||||||
else {
|
|
||||||
return {
|
|
||||||
"changes": false
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -467,7 +461,14 @@ function start(items)
|
||||||
* Call for every provider the removeFieldsFormURL method.
|
* Call for every provider the removeFieldsFormURL method.
|
||||||
*/
|
*/
|
||||||
for (var i = 0; i < providers.length; i++) {
|
for (var i = 0; i < providers.length; i++) {
|
||||||
|
let match = providers[i].matchURL(request.url);
|
||||||
|
|
||||||
|
if(match == providers[i].matchURL(request.url));
|
||||||
|
|
||||||
|
if(match)
|
||||||
|
{
|
||||||
result = removeFieldsFormURL(providers[i], request);
|
result = removeFieldsFormURL(providers[i], request);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expand urls and bypass tracking.
|
* Expand urls and bypass tracking.
|
||||||
|
@ -609,8 +610,8 @@ function start(items)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save every minute the temporary data to the disk.
|
* Save every minute the temporary data to the disk.
|
||||||
*/
|
*/
|
||||||
setInterval(saveOnExit, 60000);
|
setInterval(saveOnExit, 60000);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -628,8 +629,8 @@ function setBadgedStatus()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the icon.
|
* Change the icon.
|
||||||
*/
|
*/
|
||||||
function changeIcon()
|
function changeIcon()
|
||||||
{
|
{
|
||||||
if(storage.globalStatus){
|
if(storage.globalStatus){
|
||||||
|
@ -655,9 +656,9 @@ function checkOSAndroid()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increase by {number} the GlobalURLCounter
|
* Increase by {number} the GlobalURLCounter
|
||||||
* @param {int} number
|
* @param {int} number
|
||||||
*/
|
*/
|
||||||
function increaseGlobalURLCounter(number)
|
function increaseGlobalURLCounter(number)
|
||||||
{
|
{
|
||||||
if(storage.statisticsStatus)
|
if(storage.statisticsStatus)
|
||||||
|
@ -667,8 +668,8 @@ function increaseGlobalURLCounter(number)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increase by one the URLCounter
|
* Increase by one the URLCounter
|
||||||
*/
|
*/
|
||||||
function increaseURLCounter()
|
function increaseURLCounter()
|
||||||
{
|
{
|
||||||
if(storage.statisticsStatus)
|
if(storage.statisticsStatus)
|
||||||
|
@ -783,8 +784,8 @@ function initStorage(items)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set default values for the settings.
|
* Set default values for the settings.
|
||||||
*/
|
*/
|
||||||
function initSettings()
|
function initSettings()
|
||||||
{
|
{
|
||||||
storage.ClearURLsData = [];
|
storage.ClearURLsData = [];
|
||||||
|
@ -803,17 +804,17 @@ function initSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reloads the extension.
|
* Reloads the extension.
|
||||||
*/
|
*/
|
||||||
function reload()
|
function reload()
|
||||||
{
|
{
|
||||||
browser.runtime.reload();
|
browser.runtime.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace the old GitHub URLs with the
|
* Replace the old GitHub URLs with the
|
||||||
* new GitLab URLs.
|
* new GitLab URLs.
|
||||||
*/
|
*/
|
||||||
function replaceOldGithubURLs(url)
|
function replaceOldGithubURLs(url)
|
||||||
{
|
{
|
||||||
switch (url) {
|
switch (url) {
|
||||||
|
|
|
@ -59,7 +59,9 @@
|
||||||
"je=[^\\/|\\?|&]*(\\/|&(amp;)?)?",
|
"je=[^\\/|\\?|&]*(\\/|&(amp;)?)?",
|
||||||
"dcr=[^\\/|\\?|&]*(\\/|&(amp;)?)?",
|
"dcr=[^\\/|\\?|&]*(\\/|&(amp;)?)?",
|
||||||
"ie=[^\\/|\\?|&]*(\\/|&(amp;)?)?",
|
"ie=[^\\/|\\?|&]*(\\/|&(amp;)?)?",
|
||||||
"sei=[^\\/|\\?|&]*(\\/|&(amp;)?)?"
|
"sei=[^\\/|\\?|&]*(\\/|&(amp;)?)?",
|
||||||
|
"sa=[^\\/|\\?|&]*(\\/|&(amp;)?)?",
|
||||||
|
"dpr=[^\\/|\\?|&]*(\\/|&(amp;)?)?"
|
||||||
],
|
],
|
||||||
"exceptions": [
|
"exceptions": [
|
||||||
".*(mail\\.google\\.).*(\\/mail\\/u\\/0)\\/.*",
|
".*(mail\\.google\\.).*(\\/mail\\/u\\/0)\\/.*",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "ClearURLs",
|
"name": "ClearURLs",
|
||||||
"version": "1.2.2.19",
|
"version": "1.2.2.20",
|
||||||
"author": "Kevin R.",
|
"author": "Kevin R.",
|
||||||
"description": "Remove tracking elements form URLs.",
|
"description": "Remove tracking elements form URLs.",
|
||||||
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
|
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user