Version 1.2.2.18

+ Correct the "es" language file
+ Automatic change from github rules to gitlab rules
This commit is contained in:
Kevin Röbert 2018-06-14 18:54:37 +02:00
parent 7c4aefb219
commit b280e0955a
3 changed files with 22 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"hash_status_code_1": { "hash_status_code_1": {
"message": "Actual", "message": "Al dia",
"description": "" "description": ""
}, },

View File

@ -739,6 +739,10 @@ function setData(key, value)
case "log": case "log":
storage[key] = JSON.parse(value); storage[key] = JSON.parse(value);
break; break;
case "hashURL":
case "ruleURL":
storage[key] = replaceOldGithubURLs(value);
break;
default: default:
storage[key] = value; storage[key] = value;
} }
@ -806,6 +810,22 @@ function reload()
browser.runtime.reload(); browser.runtime.reload();
} }
/**
* Replace the old GitHub URLs with the
* new GitLab URLs.
*/
function replaceOldGithubURLs(url)
{
switch (url) {
case "https://raw.githubusercontent.com/KevinRoebert/ClearUrls/master/data/rules.hash?flush_cache=true":
return "https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/rules.hash";
case "https://raw.githubusercontent.com/KevinRoebert/ClearUrls/master/data/data.json?flush_cache=true":
return "https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/data.json";
default:
return url;
}
}
/** /**
* Check if an object is empty. * Check if an object is empty.
* @param {Object} obj * @param {Object} obj

View File

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "ClearURLs", "name": "ClearURLs",
"version": "1.2.2.17", "version": "1.2.2.18",
"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",