From b280e0955a4e5caff322ed4fba5fe56bf3b53d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20R=C3=B6bert?= Date: Thu, 14 Jun 2018 18:54:37 +0200 Subject: [PATCH] Version 1.2.2.18 + Correct the "es" language file + Automatic change from github rules to gitlab rules --- _locales/es/messages.json | 2 +- clearurls.js | 20 ++++++++++++++++++++ manifest.json | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) 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",