From b7b542077feefb8314d5bc44dcb7568bb38cda1d Mon Sep 17 00:00:00 2001 From: Bjorn Stromberg Date: Sun, 19 Aug 2018 11:50:55 +0900 Subject: [PATCH] v3.7.0 - 2018-08-19 --- CHANGELOG.md | 3 +++ package.json | 2 +- test/index.js | 3 +++ webextension/index.js | 7 +++++++ webextension/manifest.json | 3 ++- 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cc6750..22db428 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Intercept Redirect +## v3.7.0 - 2018-08-19 +- Add `curseforge.com`'s linkout + ## v3.6.2 - 2018-06-22 - [CircleCI] Restore badge, they [rolled back the badge change](https://discuss.circleci.com/t/add-way-to-clear-1-0-is-sunsetting-on-status-badge/23085/13) diff --git a/package.json b/package.json index 67e1ee0..33d78c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bjornstar/intercept-redirect", - "version": "3.6.2", + "version": "3.7.0", "description": "Skip tracking redirects that serve no purpose other than to waste your valuable time.", "main": "webextension/index.js", "dependencies": {}, diff --git a/test/index.js b/test/index.js index 4ebb089..ca4c922 100644 --- a/test/index.js +++ b/test/index.js @@ -12,6 +12,7 @@ const { analyzeURL, subdomain } = webExtension; const urls = [ 'https://bjornstar.digidip.net/visit?url=https%3A%2F%2Fbjornstar.com%2Fintercept-redirect', + 'https://wow.curseforge.com/linkout?remoteUrl=https%3A%2F%2Fbjornstar.com%2Fintercept-redirect', 'https://disq.us/url?url=https%3A%2F%2Fbjornstar.com%2Fintercept-redirect%3AzjHJ9CS7YTS6D6-FWtZRTF8swk4', 'https://exit.sc/?url=https%3A%2F%2Fbjornstar.com%2Fintercept-redirect', 'https://l.facebook.com/l.php?u=https%3A%2F%2Fbjornstar.com%2Fintercept-redirect', @@ -134,10 +135,12 @@ describe('Subdomain', function () { it(`For supported domains returns *.domain`, function () { assert.equal(subdomain('foobar.digidip.net'), '*.digidip.net'); assert.equal(subdomain('foo.bar.digidip.net'), '*.digidip.net'); + assert.equal(subdomain('wow.curseforge.com'), '*.curseforge.com'); }); it('Does not apply to domain host', function () { assert.equal(subdomain('digidip.net'), 'digidip.net'); + assert.equal(subdomain('curseforge.com'), 'curseforge.com'); }); it('Returns host when not supported', function () { diff --git a/webextension/index.js b/webextension/index.js index 775be56..815ef92 100644 --- a/webextension/index.js +++ b/webextension/index.js @@ -7,6 +7,12 @@ const googlePathnames = { }; const sites = { + // 2018-08-19 -- https://wow.curseforge.com/linkout?remoteUrl=http%253a%252f%252fi.imgur.com%252f1AjSgEH.png + '*.curseforge.com': { + pathnames: { + '/linkout': ['remoteUrl'] + } + }, '*.digidip.net': { pathnames: { '/visit': ['url'] @@ -94,6 +100,7 @@ const sites = { }; const domains = [ + 'curseforge.com', 'digidip.net' ]; diff --git a/webextension/manifest.json b/webextension/manifest.json index ff69b87..f0ea461 100644 --- a/webextension/manifest.json +++ b/webextension/manifest.json @@ -8,6 +8,7 @@ "permissions": [ "webRequest", "webRequestBlocking", + "*://*.curseforge.com/", "*://*.digidip.net/", "*://disq.us/", "*://exit.sc/", @@ -26,5 +27,5 @@ "*://workable.com/", "*://www.youtube.com/" ], - "version": "3.6.2" + "version": "3.7.0" }