From b016226750b07e23c4943a21578dcfe10796099c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20R=C3=B6bert?= Date: Fri, 15 Nov 2019 21:43:58 +0100 Subject: [PATCH 1/3] Make static data accessible via GitLab pages --- .gitlab-ci.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d85978..b67514d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,18 +9,6 @@ stages: - build - deploy -hash rules: - stage: build - script: - - sha256sum data/data.min.json | awk '{print $1}' > rules.min.hash - - node build_tools/minifyDataJSON.js "data/data.min.json" "data.minify.json" - - sha256sum data.minify.json | awk '{print $1}' > rules.minify.hash - artifacts: - paths: - - rules.min.hash - - data.minify.json - - rules.minify.hash - build firefox: stage: build script: @@ -52,8 +40,13 @@ pages: - mkdir public - mv GitLabPages/* public/ - cp img/clearurls.svg public/clearurls.svg + - cp data/data.min.json public/data/data.min.json + - sha256sum public/data/data.min.json | awk '{print $1}' > public/data/rules.min.hash + - node build_tools/minifyDataJSON.js "public/data/data.min.json" "public/data/data.minify.json" + - sha256sum public/data/data.minify.json | awk '{print $1}' > public/data/rules.minify.hash artifacts: paths: - public - only: - - master \ No newline at end of file + - rules.min.hash + - data.minify.json + - rules.minify.hash From a645b52db08898a315f11893262a996d28c61625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20R=C3=B6bert?= Date: Fri, 15 Nov 2019 21:45:43 +0100 Subject: [PATCH 2/3] . . --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b67514d..1caf9b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,6 +38,7 @@ pages: stage: deploy script: - mkdir public + - mkdir public/data - mv GitLabPages/* public/ - cp img/clearurls.svg public/clearurls.svg - cp data/data.min.json public/data/data.min.json From ecd5f82b776e1f0364f68067f3b1c318be84f7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20R=C3=B6bert?= Date: Fri, 15 Nov 2019 21:26:57 +0100 Subject: [PATCH 3/3] Version 1.9.3.1 + Changed data and hash URL to GitLab Pages, to prevent hitting the GitLab infrastructure directly [#295](https://gitlab.com/KevinRoebert/ClearUrls/issues/295#note_245456134). --- .gitlab-ci.yml | 5 ++--- CHANGELOG.md | 9 +++++++++ core_js/storage.js | 22 +++++++++++++--------- manifest.json | 2 +- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1caf9b2..f6daf24 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,6 +48,5 @@ pages: artifacts: paths: - public - - rules.min.hash - - data.minify.json - - rules.minify.hash + only: + - master \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b6613b..bee6ad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.9.3.1] - 2019-11-15 + +### Compatibility note +- Require Firefox >= 55 +- Require Chrome >= 22 + +### Changed +- Changed data and hash URL to GitLab Pages, to prevent hitting the GitLab infrastructure directly [#295](https://gitlab.com/KevinRoebert/ClearUrls/issues/295#note_245456134). + ## [1.9.3] - 2019-11-15 ### Compatibility note diff --git a/core_js/storage.js b/core_js/storage.js index 9de95f4..ba5f654 100644 --- a/core_js/storage.js +++ b/core_js/storage.js @@ -198,8 +198,8 @@ function initSettings() { storage.log = {"log": []}; storage.statisticsStatus = true; storage.badged_color = "ffa500"; - storage.hashURL = "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/rules.minify.hash?job=hash%20rules"; - storage.ruleURL = "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/data.minify.json?job=hash%20rules"; + storage.hashURL = "https://kevinroebert.gitlab.io/ClearUrls/data/rules.minify.hash"; + storage.ruleURL = "https://kevinroebert.gitlab.io/ClearUrls/data/data.minify.json"; storage.contextMenuEnabled = true; storage.historyListenerEnabled = true; storage.localHostsSkipping = true; @@ -220,19 +220,23 @@ function initSettings() { function replaceOldURLs(url) { switch (url) { case "https://raw.githubusercontent.com/KevinRoebert/ClearUrls/master/data/rules.hash?flush_cache=true": - return "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/rules.minify.hash?job=hash%20rules"; + return "https://kevinroebert.gitlab.io/ClearUrls/data/rules.minify.hash"; case "https://raw.githubusercontent.com/KevinRoebert/ClearUrls/master/data/data.json?flush_cache=true": - return "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/data.minify.json?job=hash%20rules"; + return "https://kevinroebert.gitlab.io/ClearUrls/data/data.minify.json"; case "https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/rules.hash": - return "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/rules.minify.hash?job=hash%20rules"; + return "https://kevinroebert.gitlab.io/ClearUrls/data/rules.minify.hash"; case "https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/data.json": - return "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/data.minify.json?job=hash%20rules"; + return "https://kevinroebert.gitlab.io/ClearUrls/data/data.minify.json"; case "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/rules.min.hash?job=hash%20rules": - return "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/rules.minify.hash?job=hash%20rules"; + return "https://kevinroebert.gitlab.io/ClearUrls/data/rules.minify.hash"; case "https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/data.min.json": - return "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/data.minify.json?job=hash%20rules"; + return "https://kevinroebert.gitlab.io/ClearUrls/data/data.minify.json"; case "https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/data.minify.json": - return "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/data.minify.json?job=hash%20rules"; + return "https://kevinroebert.gitlab.io/ClearUrls/data/data.minify.json"; + case "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/data.minify.json?job=hash%20rules": + return "https://kevinroebert.gitlab.io/ClearUrls/data/data.minify.json"; + case "https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/rules.minify.hash?job=hash%20rules": + return "https://kevinroebert.gitlab.io/ClearUrls/data/rules.minify.hash"; default: return url; } diff --git a/manifest.json b/manifest.json index 8953ba6..b3a5367 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "ClearURLs", - "version": "1.9.3", + "version": "1.9.3.1", "author": "Kevin Röbert", "description": "Remove tracking elements from URLs.", "homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",