Skip to content

Commit

Permalink
v8.6.0 - 2022-01-02
Browse files Browse the repository at this point in the history
- Add `c212.net` (fixes #38)
- Add `cj.dotomi.com` (fixes #39)
  • Loading branch information
bjornstar committed Jan 2, 2022
1 parent 90e20a3 commit e837a9f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Intercept Redirect

## v8.6.0 - 2022-01-02
- Add `c212.net`
- Add `cj.dotomi.com`

## v8.5.0 - 2021-12-29
- Add `r.klar.na`

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ Skip tracking redirects that serve no purpose other than to waste your valuable
This extension does not modify any of the pages that you visit. Its sole purpose is to intercept network requests intended for redirect services. It requests the bare minimum of access to these domains to protect your privacy and have the best performance.

## Supported Domains
- c212.net
- *.curseforge.com
- clickserve.dartsearch.net
- github-redirect.dependabot.com
- *.digidip.net
- disq.us
- cj.dotomi.com
- console.ebsta.com
- exit.sc
- l.facebook.com
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bjornstar/intercept-redirect",
"version": "8.5.0",
"version": "8.6.0",
"description": "Skip tracking redirects that serve no purpose other than to waste your valuable time.",
"main": "webextension/index.js",
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ const redirectUrl = 'https://bjornstar.com/intercept-redirect';
const encodedURL = encodeURIComponent(redirectUrl);

const urls = [
{ url: `https://bjornstar.digidip.net/visit?url=${redirectUrl}` },
{ url: `https://c212.net/c/link/?u=${redirectUrl}`},
// curseforge double URI encodes
{ url: `https://wow.curseforge.com/linkout?remoteUrl=${encodeURIComponent(redirectUrl)}` },
{ url: `https://clickserve.dartsearch.net/link/click?ds_dest_url=${encodedURL}` },
{ url: 'https://github-redirect.dependabot.com/bjornstar/intercept-redirect', redirectUrl: 'https://github.com/bjornstar/intercept-redirect' },
{ url: `https://bjornstar.digidip.net/visit?url=${redirectUrl}` },
{ url: `https://disq.us/url?url=${redirectUrl}%3AzjHJ9CS7YTS6D6-FWtZRTF8swk4` },
{ url: `https://cj.dotomi.com/links-t/8961927/type/dlg/sid/wtbs_61d0bb4f5c0a800d5c6d18c7/${redirectUrl}`},
{ url: `https://console.ebsta.com/linktracking/track.aspx?linkuri=${encodedURL}` },
{ url: `https://exit.sc/?url=${encodedURL}` },
{ url: `https://l.facebook.com/l.php?u=${encodedURL}` },
Expand Down
9 changes: 9 additions & 0 deletions webextension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ const searchParam = key => ({ searchParams }) => searchParams.get(key);
const decode = (s = '') => decodeURIComponent(s);
const stripFromColon = (s = '') => s.substring(0, s.lastIndexOf(':'));
const pickAfterHash = (s = '') => /^\/v1\/[0-9a-f]{64}\/(.*)/.exec(s)[1];
const dotomi = (s = '') => /^\/links-t\/\d+\/\w+\/\w+\/\w+\/\w+_[0-9a-f]{24}\/(.*)/.exec(s)[1];

const googlePathnames = {
'/imgres': ({ searchParams }) => find(['imgurl','imgrefurl'], searchParams.get.bind(searchParams)),
'/url': ({ searchParams }) => find(['q','url'], searchParams.get.bind(searchParams))
};

const sites = {
// 2022-01-02 -- https://c212.net/c/link/?t=0&l=en&o=2997076-1&h=288952320&u=http%3A%2F%2Fcreatorkit.com%2Ftop-nine-best-of-2020&a=CreatorKit.com%2FTopNine
'c212.net': {
'/c/link': searchParam('u')
},
// 2018-08-19 -- https://wow.curseforge.com/linkout?remoteUrl=http%253a%252f%252fi.imgur.com%252f1AjSgEH.png
'*.curseforge.com': {
'/linkout': url => decode(searchParam('remoteUrl')(url))
Expand All @@ -42,6 +47,10 @@ const sites = {
'disq.us': {
'/url': url => stripFromColon(searchParam('url')(url))
},
// 2022-01-02 -- https://cj.dotomi.com/links-t/8961927/type/dlg/sid/wtbs_61d0bb4f5c0a800d5c6d18c7/https://www.staples.com/APC-Back-UPS-Pro-Compact-Tower-1500VA-UPS-Battery-Backup-Surge-Protector-BX1500M/product_2724589
'cj.dotomi.com': {
'/links-t': ({ pathname }) => dotomi(pathname)
},
// 2019-09-17 -- https://console.ebsta.com/linktracking/track.aspx?trackid=3a096df7-b279-43a5-b42c-cbda7b72759c-1568686588593&linktrackingid=2&linkuri=https%3A%2F%2Fen-jp.wantedly.com%2Fprojects%2F328561
'console.ebsta.com': {
'/linktracking/track.aspx': searchParam('linkuri')
Expand Down
4 changes: 3 additions & 1 deletion webextension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
"permissions": [
"webRequest",
"webRequestBlocking",
"*://c212.net/c/link",
"*://*.curseforge.com/linkout",
"*://clickserve.dartsearch.net/link/click",
"*://github-redirect.dependabot.com/",
"*://*.digidip.net/visit",
"*://disq.us/url",
"*://cj.dotomi.com/links-t/*",
"*://console.ebsta.com/linktracking/track.aspx",
"*://exit.sc/",
"*://l.facebook.com/l.php",
Expand Down Expand Up @@ -58,5 +60,5 @@
"*://workable.com/nr",
"*://www.youtube.com/redirect"
],
"version": "8.5.0"
"version": "8.6.0"
}

0 comments on commit e837a9f

Please sign in to comment.