Tab-Session-Manager icon indicating copy to clipboard operation
Tab-Session-Manager copied to clipboard

Add regex and other patterns support to the ignore url list

Open wolph opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. For many websites both https://website.com and https://www.website.com are valid, or both http and https, and the current wildcards don't really support that scenario in a useful way.

You could do http*://*website.com but that would also match http://someotherwebsite.com which is usually not what you want.

Describe the solution you'd like

Add regular expression (and/or other pattern) support to the whitelist, possibly with a prefix or so.

We could implement the same standard as the Stylus usercss extension uses. That follows these examples: https://developer.mozilla.org/en-US/docs/Web/CSS/@document#examples

url("http://www.w3.org/"),
url-prefix("http://www.w3.org/Style/"),
domain("mozilla.org"),
media-document("video"),
regexp("https:.*") {
/* CSS rules here apply to:
- The page "http://www.w3.org/"
- Any page whose URL begins with "http://www.w3.org/Style/"
- Any page whose URL's host is "mozilla.org" or ends with ".mozilla.org"
- Any standalone video
- Any page whose URL starts with "https:" */

Describe alternatives you've considered

I could write a script to generate all possible variants, but that seems a bit silly

Additional context

wolph avatar Sep 21 '22 12:09 wolph