diff --git a/_locales/es/messages.json b/_locales/es/messages.json index eb3764d..89dc111 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -1,6 +1,6 @@ { "hash_status_code_1": { - "message": "Actual", + "message": "Al dia", "description": "" }, diff --git a/clearurls.js b/clearurls.js index 7efbabc..9584ccb 100644 --- a/clearurls.js +++ b/clearurls.js @@ -739,6 +739,10 @@ function setData(key, value) case "log": storage[key] = JSON.parse(value); break; + case "hashURL": + case "ruleURL": + storage[key] = replaceOldGithubURLs(value); + break; default: storage[key] = value; } @@ -806,6 +810,22 @@ function 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. * @param {Object} obj diff --git a/manifest.json b/manifest.json index 38475d6..aba850c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "ClearURLs", - "version": "1.2.2.17", + "version": "1.2.2.18", "author": "Kevin R.", "description": "Remove tracking elements form URLs.", "homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",