Live data from Hacker News

Browser extension (Firefox, Chrome, Opera, Edge) to redirect URLs based on regex

github.com

41–49 of 49 posts

Re: Browser extension (Firefox, Chrome, Opera, Edge) to redirect URLs based on regex

#41

I find it annoying when people share direct URLs to PDFs at arxiv.org instead of the the abstract. However, if I were to use a redirect extension like this one, then my own click on the PDF link would get redirected back to the abstract page. To handle this, the redirect rule needs to consider the referer page too, with a possible exception if the referer is the same site as the destination.

Dear god... this is a major pet peeve of mine. I frequently open the links on my phone and the pdf just eats data and results in a terrible reading experience.

The reason I open on my phone is because I find via places like HN, Twitter, Bsky, read the abstract, and then send the link back to my computer for later reading (Firefox send tabs). 99.9% of the time I do not want the pdf...

Re: Browser extension (Firefox, Chrome, Opera, Edge) to redirect URLs based on regex

#42

The extension is no longer available on Chrome. So, I am looking for a way to automatically redirect x.com to xcancel.com

Just write a simple user script with Tamper/Greasemonkey. You can even paste it into ChatGPT and it will give you one.

Re: Browser extension (Firefox, Chrome, Opera, Edge) to redirect URLs based on regex

#44

Earlier quoted context omitted.

There used to be this nice proxy-thing for windows called the "Proxomitron" (or such), peculiar one-eyed pyramid icon and everything! Wonder if it's still around. Been a while.-

That's what I use.

Still around! :)

Re: Browser extension (Firefox, Chrome, Opera, Edge) to redirect URLs based on regex

#46

I've used this before, but the biggest missing feature is a compendium of built-in common fixes, like removing the &si= tracker junk off of youtube links, and so on...

This is the "God-like powers" extension. The "set it and forget it" extension is called ClearURLs.

There's also Request Control, which is probably what you're looking for. More powerful than Redirector actually, but it comes with some common rules built in (not as comprehensive as ClearURLs though).

https://github.com/ClearURLs/Addon

https://github.com/slymax/request-control

Re: Browser extension (Firefox, Chrome, Opera, Edge) to redirect URLs based on regex

#47

I find it annoying when people share direct URLs to PDFs at arxiv.org instead of the the abstract. However, if I were to use a redirect extension like this one, then my own click on the PDF link would get redirected back to the abstract page. To handle this, the redirect rule needs to consider the referer page too, with a possible exception if the referer is the same site as the destination.

I wrote firefox and chrome extensions that do exactly what you want:

Firefox: https://addons.mozilla.org/en-US/firefox/addon/redirectify/

Chrome: https://chrome.google.com/webstore/detail/redirectify/mhjmbf...

Source: https://github.com/imurray/redirectify

Sadly I never got around to making it configurable, so it's just a fixed table of rules for a handful of journal and pre-print sites.

Re: Browser extension (Firefox, Chrome, Opera, Edge) to redirect URLs based on regex

#48

Earlier quoted context omitted.

https://libredirect.github.io/ https://libredirect.codeberg.page/

This is also a MV2 extension and therefore also not available on Chrome.

Not sure what search you're using, but Googling `xcancel redirect` gave me plenty on the first page. You could be stuck in a search bubble. Maybe try searching in private browsing mode?

This one is manifest v3: https://chromewebstore.google.com/detail/xcancelcom-redirect...

This userscript (despite the name) also redirects to xcancel: https://greasyfork.org/en/scripts/450008-twitter-to-nitter-r...

Re: Browser extension (Firefox, Chrome, Opera, Edge) to redirect URLs based on regex

#49
post #2

Sadly late 2021 the original dev passed away. Someone has taken over stewardship of the project but it is currently moving slowly and they are seeking more contributors (javascript skills are a plus). He was a bit of a hn user and seemed good natured and pleasant. Though I didn't know him I was sad to hear he'd passed both as a Redirector user and a fan of good people doing good things. I know he'd mentioned being ha…

I have just installed this tool to redirect Reddit, as it today started to block me (see https://news.ycombinator.com/item?id=41411226).

I like the feedback which the Add-on gives when adding a new redirection. Dead dev, you left a useful tool behind.

Post reply on HN