From 3f707bfd3af06d1aea5cea9d6de45fd4ddab8651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20R=C3=B6bert?= Date: Wed, 15 Apr 2020 00:53:01 +0200 Subject: [PATCH] Version 1.17.0 #457 #462 #445 --- .gitlab-ci.yml | 21 ++++----------------- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ README.md | 4 +--- core_js/eTagFilter.js | 3 ++- core_js/google_link_fix.js | 2 +- core_js/tools.js | 12 ++++++++---- data/data.min.json | 8 +++++--- manifest.json | 15 +-------------- promotion/download-128.png | Bin 0 -> 1340 bytes 9 files changed, 50 insertions(+), 43 deletions(-) create mode 100644 promotion/download-128.png diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 577c3f8..cb241cf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ image: debian:latest before_script: - export DEBIAN_FRONTEND= noninteractive - apt-get update -y - - apt-get install -y zip unzip jq nodejs + - apt-get install -y zip unzip nodejs stages: - build @@ -23,30 +23,17 @@ hash rules: only: - master -build firefox: +bundle addon: stage: build script: - - zip ClearUrls_firefox -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/* + - zip ClearUrls -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/* only: - master artifacts: paths: - - ClearUrls_firefox.zip - -build chrome: - stage: build - script: - - jq 'del(.applications)' manifest.json > manifest.json.tmp && mv manifest.json.tmp manifest.json - - zip ClearUrls_chrome -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/* - - only: - - master - - artifacts: - paths: - - ClearUrls_chrome.zip + - ClearUrls.zip pages: stage: deploy diff --git a/CHANGELOG.md b/CHANGELOG.md index b48c930..b1930e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,34 @@ 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.17.0] - 2020-04-14 + +### Compatibility note +- Require Firefox >= 55 +- Require Chrome >= 22 + +### Changed +- Updated some strings of Spanish translation +- Updated some strings of French translation +- Updated some strings of Italian translation +- Updated some strings of Russian translation +- Updated some strings of Swedish translation +- Updated some strings of Turkish translation +- Updated some strings of Ukrainian translation +- Updated some strings of Chinese Simple translation + +### Fixed +- Fixed a typo in the path to the Datatables JavaScript file +- Fixed [#445](https://gitlab.com/KevinRoebert/ClearUrls/issues/445) +- Fixed [#462](https://gitlab.com/KevinRoebert/ClearUrls/issues/462) + +### Added +- Added check for setBadgeTextColor function (only supported in Firefox) + +### Removed +- Removed browser-polyfill content script import (seems no longer needed) +- Removed old `applications` value + ## [1.16.0] - 2020-03-20 ### Compatibility note diff --git a/README.md b/README.md index 5d81f78..c23b8a6 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,7 @@ Reasoning for needed permissions can be found under [here](https://gitlab.com/Ke ## CI/CD Artifacts Download (for Firefox- and Chrome-Dev only) Here you can download the packed files for the Firefox- and Chrome-Dev: -[Firefox](https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/ClearUrls_firefox.zip?job=build%20firefox) - -[Chrome](https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/ClearUrls_chrome.zip?job=build%20chrome) +[](https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/ClearUrls.zip?job=bundle%20addon) ## Test If you want to test whether ClearURLs works correctly on your system, you can go to this test page: [https://kevinroebert.gitlab.io/ClearUrls/](https://kevinroebert.gitlab.io/ClearUrls/) diff --git a/core_js/eTagFilter.js b/core_js/eTagFilter.js index 6a92a39..cb8213c 100644 --- a/core_js/eTagFilter.js +++ b/core_js/eTagFilter.js @@ -22,7 +22,8 @@ * Filters eTag headers from web requests. */ function eTagFilter(requestDetails) { - if(!requestDetails.responseHeaders || !storage.eTagFiltering) return {}; + if(!requestDetails.responseHeaders || !storage.eTagFiltering + || storage.localHostsSkipping && checkLocalURL(requestDetails.url)) return {}; const responseHeaders = requestDetails.responseHeaders; const filteredHeaders = responseHeaders.filter(header => { diff --git a/core_js/google_link_fix.js b/core_js/google_link_fix.js index 63c5550..8d967e3 100644 --- a/core_js/google_link_fix.js +++ b/core_js/google_link_fix.js @@ -30,7 +30,7 @@ ele.type = 'text/javascript'; ele.textContent = "Object.defineProperty(window, 'rwt', {" + - " value: function() { return false; }," + + " value: function() { return true; }," + " writable: false," + " configurable: false" + "});"; diff --git a/core_js/tools.js b/core_js/tools.js index 4d3d983..676a530 100644 --- a/core_js/tools.js +++ b/core_js/tools.js @@ -233,9 +233,13 @@ function setBadgedStatus() { browser.browserAction.setBadgeBackgroundColor({ 'color': color }).catch(handleError); - browser.browserAction.setBadgeTextColor({ - color: "#FFFFFF" - }).catch(handleError); + + // Works only in Firefox: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction/setBadgeTextColor#Browser_compatibility + if (getBrowser() === "Firefox") { + browser.browserAction.setBadgeTextColor({ + color: "#FFFFFF" + }).catch(handleError); + } } }); } @@ -283,7 +287,7 @@ Object.prototype.getOrDefault = function (key, defaultValue) { }; function handleError(error) { - console.log(translate('core_error') + ":" + error); + console.log("[ClearURLs ERROR]:" + error); } /** diff --git a/data/data.min.json b/data/data.min.json index 0d0a2ee..01f31a9 100644 --- a/data/data.min.json +++ b/data/data.min.json @@ -1603,8 +1603,8 @@ "redirections": [], "forceRedirection": false }, - "tb.com": { - "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(tb)(\\.com).*", + "tb.cn": { + "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(tb)(\\.cn).*", "completeProvider": false, "rules": [ "sm" @@ -1627,7 +1627,9 @@ ], "referralMarketing": [], "rawRules": [], - "exceptions": [], + "exceptions": [ + ".*(api\\.bilibili\\.com)\\/.*" + ], "redirections": [], "forceRedirection": false }, diff --git a/manifest.json b/manifest.json index 6cc6a43..efc8d5a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,16 +1,11 @@ { "manifest_version": 2, "name": "ClearURLs", - "version": "1.16.0", + "version": "1.17.0", "author": "Kevin Röbert", "description": "__MSG_extension_description__", "homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls", "default_locale": "en", - "applications": { - "gecko": { - "id": "{74145f27-f039-47ce-a470-a662b129930a}" - } - }, "icons": { "16": "img/clearurls_16x16.png", "19": "img/clearurls_19x19.png", @@ -74,14 +69,6 @@ ] }, "content_scripts": [ - { - "matches": [ - "" - ], - "js": [ - "browser-polyfill.js" - ] - }, { "all_frames": true, "matches": [ diff --git a/promotion/download-128.png b/promotion/download-128.png new file mode 100644 index 0000000000000000000000000000000000000000..33107d4780bd7136c4c98ed08590a91851a37c14 GIT binary patch literal 1340 zcmb7^YgEz)0LA}`0fi!(5k3-F59MT~q2*>G2(8F8E1fu*>2#XXLgp%p3bf4U%$3vf zky-N$PY)ew>eQf|j}(S0Cg$WN$=b<4q5xB2wy&MDb9T?U_kOsa@2@yEW|zwfuN43Q zxKMXf4lFhAy`kWx>?5R(EYviUvrA`FRH!{aVf|z89jyAcV{&=ao;8{9P-p#*?IFssd+T~O_icQ`L)89^)`n=UDOaGED9YqRxXS#sOCk0$YFj?_sjd0)P{1qfn~;nKT)m z+mAoj1Uv0h#YVJWB*$fdTRCFK6Fq|(b&TO&H-9g1MYCZb%aFP*vo7O8ZL%WaBVbGu zkR##vl;3@;Cw-&ORDXRg%l6!@HE?vnhrKqK?bXXIG%TZ)%6Tf@)jZu`&u~}HHT##A zh#@YRJy7ku8tr%sS7KNn%-)mIKH4+dy_(tu7JVXi>kN^h*pIe#)L*FlZCl6k9iG{+ zNdY_;SEvaCeLDvZ4Ur*f@R1p-vwwZ77@jvBX=+x6QwKHyV>C=Ed?tua$b2 zb*>@@hV59D_4tjK_h~;PH(sXq-BBr|50Vc@3$|AT1NR>We^FC#wgHqtMscOR2|RDn zca>QGTPkIya9H2_qV`7A(`{1^TBuQ9oEYkOiUu+-ZFRdLQ2C_bzdqI zqi{xKNzh)mMKF6V<^U9qvt=^_(oEytyWM%?3|kzwC~@I|j05@|RFN$~hdJR&gnk+& zalsR#sfqXudI{Ok#sTdIAs787c0m8l?w$%yd7fSU%AS$W9srzCPwM3Ubx16 zf?y+sTl$s6N+51J+}?@hM;a{@rFRh?6!#+B&d2iOjK#w3vG3+O&PdJPl3CoLN`>5i z!(?wR&W1_S>R}{*P1v#~ut*;?5_JSwbtXx4dR6kJdm(tN z7BEjpgt3KMMZqAcsZ^C29TPZ`R<<2dW6vm=YaK%0q%&RvZET`3-r!*v`JA!;r(aP7EPbkcQ}X`-LeF&( literal 0 HcmV?d00001