Skip to content

Instantly share code, notes, and snippets.

@davegallant
Last active January 31, 2024 02:44
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davegallant/70fca6dc6fbb9d55ba456580339ccb22 to your computer and use it in GitHub Desktop.
Save davegallant/70fca6dc6fbb9d55ba456580339ccb22 to your computer and use it in GitHub Desktop.
// This is now maintained at https://github.com/davegallant/rfd-redirect-stripper/blob/main/script.js
@YesTrustMe
Copy link

YesTrustMe commented Dec 28, 2022

Thanks for the update. I added @aman207 's code. However, I'm confused now with @davegallant 's script. I tried to add it (as a new script) file script.js into Tampermonkey but it came back with an error, "invalid userscript".

Additionally, I suppose there's no way to add a "wild card" feature because RFD is now adding their crap to every URL/link (site)? Adding them manually is quite time consuming, but appreciated nonetheless.

@aman207
Copy link

aman207 commented Dec 29, 2022

Thanks for the update. I added @aman207 's code. However, I'm confused now with @davegallant 's script. I tried to add it (as a new script) file script.js into Tampermonkey but it came back with an error, "invalid userscript".

Additionally, I suppose there's no way to add a "wild card" feature because RFD is now adding their crap to every URL/link (site)? Adding them manually is quite time consuming, but appreciated nonetheless.

Did you use the "raw" link when adding it? https://raw.githubusercontent.com/timwharton/rfd-redirect-stripper/main/script.js

@YesTrustMe
Copy link

Thanks for the update. I added @aman207 's code. However, I'm confused now with @davegallant 's script. I tried to add it (as a new script) file script.js into Tampermonkey but it came back with an error, "invalid userscript".
Additionally, I suppose there's no way to add a "wild card" feature because RFD is now adding their crap to every URL/link (site)? Adding them manually is quite time consuming, but appreciated nonetheless.

Did you use the "raw" link when adding it? https://raw.githubusercontent.com/timwharton/rfd-redirect-stripper/main/script.js

Thanks. No. I used @davegallant link: https://gist.githubusercontent.com/davegallant/70fca6dc6fbb9d55ba456580339ccb22/raw/be0fbad0aad349778655a9052ff9ca73177e294b/rfd-redirect-stripper.js then I "right clicked" to "Save as" rfd-redirect-stripper.js. That didn't work. This is one of my major pet peeves about GH is I don't find it intuitive or simple to add a script or even download a file unless it's clear as crystal.

The URL link: https://github.com/davegallant/rfd-redirect-stripper.git won't update in Tampermonkey with the new changes.

@aman207
Copy link

aman207 commented Dec 29, 2022

I would just start from scratch. Copy and paste the text from here into a new script in tamper monkey
https://raw.githubusercontent.com/timwharton/rfd-redirect-stripper/main/script.js

@davegallant
Copy link
Author

Thanks for the update. I added @aman207 's code. However, I'm confused now with @davegallant 's script. I tried to add it (as a new script) file script.js into Tampermonkey but it came back with an error, "invalid userscript".
Additionally, I suppose there's no way to add a "wild card" feature because RFD is now adding their crap to every URL/link (site)? Adding them manually is quite time consuming, but appreciated nonetheless.

Did you use the "raw" link when adding it? https://raw.githubusercontent.com/timwharton/rfd-redirect-stripper/main/script.js

Thanks. No. I used @davegallant link: https://gist.githubusercontent.com/davegallant/70fca6dc6fbb9d55ba456580339ccb22/raw/be0fbad0aad349778655a9052ff9ca73177e294b/rfd-redirect-stripper.js then I "right clicked" to "Save as" rfd-redirect-stripper.js. That didn't work. This is one of my major pet peeves about GH is I don't find it intuitive or simple to add a script or even download a file unless it's clear as crystal.

The URL link: https://github.com/davegallant/rfd-redirect-stripper.git won't update in Tampermonkey with the new changes.

I updated the gist to be the latest commit in main, but updating in both places is a bit cumbersome.

Maybe having the script dynamically update itself by fetching a github file would be better?

@YesTrustMe
Copy link

I would just start from scratch. Copy and paste the text from here into a new script in tamper monkey https://raw.githubusercontent.com/timwharton/rfd-redirect-stripper/main/script.js

@aman207 Ok.

I updated the gist to be the latest commit in main, but updating in both places is a bit cumbersome.

Maybe having the script dynamically update itself by fetching a github file would be better?

@davegallant Yes, that would be awesome if the script could update itself automatically.

@YesTrustMe
Copy link

Hi Dave, I was wondering if you can check this RFD link. I'm diverted back to RFD's main webpage when clicking the HP hyperlink: https://forums.redflagdeals.com/hp-hp-230-wireless-mouse-keyboard-combo-17-99-2606859/

@aman207
Copy link

aman207 commented Mar 17, 2023

Hi Dave, I was wondering if you can check this RFD link. I'm diverted back to RFD's main webpage when clicking the HP hyperlink: https://forums.redflagdeals.com/hp-hp-230-wireless-mouse-keyboard-combo-17-99-2606859/

Had some time to take a look at this. Just a matter of adding another regex pattern
PR created davegallant/rfd-redirect-stripper#2

@YesTrustMe
Copy link

Hi Dave, I was wondering if you can check this RFD link. I'm diverted back to RFD's main webpage when clicking the HP hyperlink: https://forums.redflagdeals.com/hp-hp-230-wireless-mouse-keyboard-combo-17-99-2606859/

Had some time to take a look at this. Just a matter of adding another regex pattern PR created davegallant/rfd-redirect-stripper#2

Thanks Dave!

I noticed your script isn't updating automatically in Tampermonkey. I copy and pasted the above and it works beautifully!

@davegallant
Copy link
Author

Seems to be working fine now.

Hi. My adblock program (Ghostery) is blocking a new script on RFD which isn't cleaned by your script. The link is here: http://go.redirectingat.com/?id=130832X1694315&xs=1&url=https%3A%2F%2Fwww.dell.com%2Fpreferences%2Fsignup%2F%3Fref%3Dcpbc_technologysolutionsandupdates1_cta_secondary_myhome%26amp%3Bc%3Dca%26amp%3Bl%3Den%26amp%3Bs%3Ddhs
Webpage from RFD is here: https://forums.redflagdeals.com/dell-alienware-m15-r7-i9-12900h-rtx3070ti-32gb-qhd-240hz-g-sync-1tb-ssd-1750-after-12-cb-10-coupon-2610195/#p37460956

Seems to be working now.

I've added two more regular expressions here that should fix this:
davegallant/rfd-redirect-stripper@1b3abd9

I'm in the process of making browser extensions for both chrome and firefox. This allows for automatic updating in the background.

They are working now, but are not packaged or published yet. See https://github.com/davegallant/rfd-redirect-stripper#browser-extensions

@YesTrustMe
Copy link

Seems to be working fine now.
I've added two more regular expressions here that should fix this: davegallant/rfd-redirect-stripper@1b3abd9

I'm in the process of making browser extensions for both chrome and firefox. This allows for automatic updating in the background.

They are working now, but are not packaged or published yet. See https://github.com/davegallant/rfd-redirect-stripper#browser-extensions

Wow! That's awesome. Looking forward to this!

@davegallant
Copy link
Author

Firefox extension has been published and approved:
https://addons.mozilla.org/en-US/firefox/addon/rfd-redirect-stripper/

Not sure how much time I'll have for a Chrome extension atm.

@YesTrustMe
Copy link

Firefox extension has been published and approved: https://addons.mozilla.org/en-US/firefox/addon/rfd-redirect-stripper/

Not sure how much time I'll have for a Chrome extension atm.

Tampermonkey works well so if you don't get around to it. we still have script 👍

@YesTrustMe
Copy link

YesTrustMe commented May 25, 2023

Looks like RFD is at it again. The script isn't cleaning this link, but my DNS blocker is blocking it: http://go.redirectingat.com/?id=130832X1694315&xs=1&url=https%3A%2F%2Fpublicmobile.ca%2Fen%2Fon%2Fplans

@davegallant
Copy link
Author

Looks like RFD is at it again. The script isn't cleaning this link, but my DNS blocker is blocking it: http://go.redirectingat.com/?id=130832X1694315&xs=1&url=https%3A%2F%2Fpublicmobile.ca%2Fen%2Fon%2Fplans

Do you have an example?

It's working for me here: https://forums.redflagdeals.com/verizon-verizon-free-30-day-trial-esim-compatible-phone-100gb-free-data-2580046/

@YesTrustMe
Copy link

Sorry for the late reply. I didn't get an email confirmation.

Here's a thread to try: https://forums.redflagdeals.com/lenovo-ideacentre-5i-desktop-i7-12700-1tb-hdd-512gb-ssd-16gb-ram-rtx-3060-999-99-2635552/#p37972762

@davegallant
Copy link
Author

Sorry for the late reply. I didn't get an email confirmation.

Here's a thread to try: https://forums.redflagdeals.com/lenovo-ideacentre-5i-desktop-i7-12700-1tb-hdd-512gb-ssd-16gb-ram-rtx-3060-999-99-2635552/#p37972762

Hi. I don't know if there was a recent update to the script, but this link here isn't going anywhere for me:

http://go.redirectingat.com/?id=130832X1694315&xs=1&url=https%3A%2F%2Freolink.com%2Fca%2Fproduct%2Frlc-822a%2F%3Ffbclid%3DIwAR3n-Ya0eeLs-nPwg85IPq00IaxcMBYbBGPKIYsrys0jbZ0q5APBrfNgeD0

It belongs to: https://forums.redflagdeals.com/reolink-reolink-rlc-822a-4k-poe-camera-3x-optical-zoom-person-vehicle-pet-detection-107-24-2641498/#p38079180

@YesTrustMe These are both working for me. Are you getting the latest script or extension from here?

This gist is no longer being maintained.

@YesTrustMe
Copy link

YesTrustMe commented Dec 26, 2023

Hi Dave,

Yes, I occasionally copy and paste the contents if there are issues. However, I let Tampermonkey update on it's own.

For instance, this thread here doesn't work for me: https://forums.redflagdeals.com/dell-wireless-keyboard-mouse-20-minus-whatever-coupons-discounts-rewards-2665134/

Interestingly, sometimes the script doesn't work and other times it does after not working for the same link.

Take for instance the above link. I closed and restarted Chrome and it works with an updated script in the link you provided above. Otherwise, this is what it reads:

The webpage at http://www.jdoqocy.com/click-749547-12105225?url=https%3A%2F%2Fwww.dell.com%2Fen-ca%2Fshop%2Fdell-wireless-keyboard-and-mouse-km3322w%2Fapd%2F580-akcw%2Fpc-accessories might be temporarily down or it may have moved permanently to a new web address.

@davegallant
Copy link
Author

Hi Dave,

Yes, I occasionally copy and paste the contents if there are issues. However, I let Tampermonkey update on it's own.

For instance, this thread here doesn't work for me: https://forums.redflagdeals.com/dell-wireless-keyboard-mouse-20-minus-whatever-coupons-discounts-rewards-2665134/

Interestingly, sometimes the script doesn't work and other times it does after not working for the same link.

Take for instance the above link. I closed and restarted Chrome and it works with an updated script in the link you provided above. Otherwise, this is what it reads:

The webpage at http://www.jdoqocy.com/click-749547-12105225?url=https%3A%2F%2Fwww.dell.com%2Fen-ca%2Fshop%2Fdell-wireless-keyboard-and-mouse-km3322w%2Fapd%2F580-akcw%2Fpc-accessories might be temporarily down or it may have moved permanently to a new web address.

I'm using the Firefox extension and can't reproduce this. Are you copying and pasting from here? This gist is no longer being updated.

@YesTrustMe
Copy link

YesTrustMe commented Dec 29, 2023

Hi Dave,

The link is working today. I am using Chrome. I also copied and pasted from the link you provided above: https://github.com/davegallant/rfd-redirect-stripper/blob/main/script.js

I'm unclear on what you mean this gist is no longer updated. Does that mean you are no longer updating the RFD stripper script? If that's the case, I won't bother you any further. I appreciate it working as long as it did.

All the best to you and your family in 2024!

@davegallant
Copy link
Author

davegallant commented Dec 29, 2023

Hi Dave,

The link is working today. I am using Chrome. I also copied and pasted from the link you provided above: https://github.com/davegallant/rfd-redirect-stripper/blob/main/script.js

I'm unclear on what you mean this gist is no longer updated. Does that mean you are no longer updating the RFD stripper script? If that's the case, I won't bother you any further. I appreciate it working as long as it did.

All the best to you and your family in 2024!

Hey. To avoid confusion I edited this gist that we're commenting on to link to https://github.com/davegallant/rfd-redirect-stripper/blob/main/script.js

Any future issues with the script / extension can be created in the issues tab.

@davegallant
Copy link
Author

Little update:

rfd.fyi is now stripping redirects using the same redirect.json that we've been maintaining here.

@YesTrustMe
Copy link

Thanks Dave! Do we have to do anything different with the redirect.json or can we just copy and paste normally from: https://github.com/davegallant/rfd-redirect-stripper/blob/main/script.js ?

@davegallant
Copy link
Author

Thanks Dave! Do we have to do anything different with the redirect.json or can we just copy and paste normally from: https://github.com/davegallant/rfd-redirect-stripper/blob/main/script.js ?

Yes, this file should stay in sync with the browser extensions now that it's generated in the github action workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment