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 0000000..33107d4
Binary files /dev/null and b/promotion/download-128.png differ