sblask-webextensions / webextension-skip-redirect

Some web pages use intermediary pages before redirecting to a final page. This add-on tries to extract the final url from the intermediary url and goes there straight away if successful.
https://addons.mozilla.org/firefox/addon/skip-redirect/
MIT License
490 stars 45 forks source link

How to enter RE? #125

Closed rubaboo closed 5 years ago

rubaboo commented 5 years ago

How do I actually enter a regular expression into blacklist? do I need to /enclose in shashes/ like a JS regex literal? If I simply enter the domain name, it works, but any attempt at a simplest RE fails. Please provide an example, say if I wanted to match the full URL and nothing else. Something like

/https:\/\/pinboard\.in$/
sblask commented 5 years ago

No enclosing slashes. I can't give an example because I don't know what you try to do. But the trailing $ is almost certainly wrong unless your URL is example.com/?redirectto=https://pinboard.in

sblask commented 5 years ago

I can give you an example that I have in my blacklist: ^https:\/\/github\.com\/ so any redirects on github are not skipped.