Skip to content

Commit

Permalink
Add out.reddit.com tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAProton committed Nov 27, 2023
1 parent 634fe6c commit 31169d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/html/tracker-bypass.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@ function updateTrackerMessage(url) {
}

async function resolveTracker(url) {
//special case for out.reddit.com
const urlObj = new URL(url);
if (urlObj.host === 'out.reddit.com') {
const newUrl = urlObj.searchParams.get('url');
if (newUrl) updateTrackerMessage(newUrl);
else showError();
}

url = url.replace(/(^\w+:|^)\/\//, '');

try {
const response = await fetch(`https://unshorten.me/json/${url}`);
const data = await response.json();
Expand Down
3 changes: 2 additions & 1 deletion src/js/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@
"*://*.disq.us/url?url=*",
"*://rebrand.ly/*",
"*://rb.gy/*",
"*://buff.ly/*"
"*://buff.ly/*",
"*://out.reddit.com/*"
],
"tracker_force_http": [
"ow.ly",
Expand Down

0 comments on commit 31169d4

Please sign in to comment.