mirror of
https://github.com/davegallant/rfd-affiliate-stripper.git
synced 2026-09-01 13:27:04 +00:00
a browser extension that strips affiliate redirects on RFD
- JavaScript 90.4%
- CSS 3.9%
- Go Template 2.5%
- Nix 2%
- HTML 1.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.18. - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.18) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 1.1.18 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
| .github/workflows | ||
| css | ||
| html | ||
| js | ||
| .envrc | ||
| .gitignore | ||
| CHANGELOG.md | ||
| flake.lock | ||
| flake.nix | ||
| icon-16x16.png | ||
| icon-32x32.png | ||
| icon-48x48.png | ||
| icon-64x64.png | ||
| icon-128x128.png | ||
| icon.png | ||
| LICENSE | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| redirects.json | ||
| renovate.json | ||
| script.js | ||
| script.js.tmpl | ||
| stripRedirect.test.js | ||
rfd-affiliate-stripper
Strips affiliate redirects from deal links posted on RFD.
On every page load, it transforms a link with tracking such as
http://www.amazon.ca/gp/redirect.html?ie=UTF8&location=https%3A%2F%2Fwww.amazon.ca%2Fdp%2FB09YXY3DKN%3Fref%3Dcm_sw_r_apan_dp_NX4HJ8HZ3XX2YK1J900A%26ref_%3Dcm_sw_r_apan_dp_NX4HJ8HZ3XX2YK1J900A%26social_share%3Dcm_sw_r_apan_dp_NX4HJ8HZ3XX2YK1J900A%26starsLeft%3D1%26skipTwisterOG%3D1&tag=redflagdealsc-20&linkCode=ur2&camp=15121&creative=330641
into
https://www.amazon.ca/dp/B09YXY3DKN
Why?
This helps navigate around broken links when using certain adblockers.
Building the extension
To build the extension, run:
npm install
npm run build
Updating redirects
The browser extension will update the list of redirects by periodically fetching the latest redirects.json.
Open a pull request to this repo to update the redirects.
An easy way to test regex: regex101.com.
New config can be tested by pointing the config url of the extension to your own branch.
For example:
https://raw.githubusercontent.com/davegallant/rfd-affiliate-stripper/my-new-branch/redirects.json
Tampermonkey Script
This was originally a Tampermonkey userscript before evolving into a browser extension.
To use as a tampermonkey script, copy script.js into Tampermonkey.

