proginosko / LeechBlockNG

LeechBlock NG (Next Generation) for Firefox is a simple productivity tool designed to block those time-wasting sites that can suck the life out of your working day. All you need to do is specify which sites to block and when to block them.
https://www.proginosko.com/leechblock/
Mozilla Public License 2.0
721 stars 66 forks source link

Multi regex support #300

Closed xmha97 closed 1 year ago

xmha97 commented 1 year ago

Hi, I want to block the NSFW site in some regex:

1st regex:

^(https?|file):\/+([\w\:]+@)?((www\.)?badsite1\.com|(www\.)?badsite2\.com|(www\.)?badsite3\.com)

2nd regex:

^https?:\/\/(www.)?google\.com\/search\?.*q=.*(badword1|badword2|badword3).*

3rd regex:

^https?:\/\/(www.)?yandex\.com\/search\/\?.*text=.*(badword1|badword2|badword3).*

Please help me.

(I don't want to change DNS for this)

proginosko commented 1 year ago

Why not use three block sets, one for each?

xmha97 commented 1 year ago

The first reason is that I don't know how to merge these three regex together.

The second reason is that it's hard to change a long regex, and it's easier to change them if it's in separate blocks.

proginosko commented 1 year ago

So why not use three block sets, one for each? 🙂

xmha97 commented 1 year ago

Excuse me my English is weak and now I realized you. 😅

Now I use three block sets and everything works fine.

You can close this issue.

Thanks for your help 🙏