einaregilsson / Redirector

Browser extension (Firefox, Chrome, Opera, Edge) to redirect urls based on regex patterns, like a client side mod_rewrite.
http://einaregilsson.com/redirector/
MIT License
1.54k stars 159 forks source link

[fr] Add several exclusion patterns #227

Open 35609902357 opened 4 years ago

35609902357 commented 4 years ago

At the moment only one exclusion pattern can be provided, which is a problem when using wildcards.

For example if I want to redirect https://www.reddit.com/r/* to https://old.reddit.com/r/$1, but I don't want "all", "pics" and "videos" subreddits to be redirected, I can't do it, I can only input one url to exclude. Wildcards/regex don't help because these paterns aren't regular

It would be nice to have a "+" button to add another Exclude pattern field to input another url that can't be covered by wildcards/regex.

Or to have something like linebreaks:

https://www.reddit.com/r/all
https://www.reddit.com/r/pics
https://www.reddit.com/r/videos

or comma separated values , like:

https://www.reddit.com/r/all,https://www.reddit.com/r/pics, https://www.reddit.com/r/videos

einaregilsson commented 4 years ago

Why not use a regex: https://www\.reddit\.com/r/(all|pics|videos) ?

35609902357 commented 4 years ago

I input that line as an exclusion pattern, but it doesn't work. Maybe because the redirect is using wildcard instead of regex?

einaregilsson commented 4 years ago

Yeah, you need to use regex patterns for this. Wildcard patterns are only to do the most simple stuff, anything more than that you need regex.

35609902357 commented 4 years ago

That's why several exclusion patterns are useful, you can combine the simplicity of wildcards, but can exclude urls as needed. Instead of rewriting every filter as regex, which are more complicated.

einaregilsson commented 4 years ago

Sorry, I don't want to add more complexity to the UI. For more complex things you'll have to use regex.

35609902357 commented 4 years ago

How does having the possibility of adding urls separated by comma instead of only one url complicate UI?

https://www.reddit.com/r/all

vs

https://www.reddit.com/r/all,https://www.reddit.com/r/pics,https://www.reddit.com/r/videos

It's just more characters inside the same box

ANIMka commented 5 days ago

What if I need to add several sites to exceptions?

stdedos commented 4 days ago

On a tangent, I'd like "multiple examples" (in the "test-driven development" sense)