Comments (3)
Hi @Zeeex
Thank you for the suggestions. Support for both subdomains and wildcards definitely sounds nice, and I am keen on adding them both. Let's see what would be the best way to approach.
Blocking subdomains
Because wildcard in DNS does not cover root domain, *.fandom.com would block only subdomains, but not fandom.com. To block them both, both would need to be stated:
fandom.com
*.fandom.com
I think this is the control you were referring to. No hidden behaviour as well. To block only subdomains:
*.fandom.com
And to block all subdomains except one:
*.fandom.com
!pokemon.fandom.com
Can we agree this is the behaviour we would want?
Wildcards support
Besides blocking subdomains, wildcard could be used anywhere in the path, to match any directory for example. The following example would block all topics:
fandom.com/topics/*
And similarly, to block all topics except one:
fandom.com/topics/*
!fandom.com/topics/anime
Can we agree this is the behaviour we would want?
from block-site.
Hi again @Zeeex
I have it implemented. Also added support for matching any one character using ?
.
Note:
With the addition of *
and ?
, blocked sites no longer expand automatically. That means, blocking youtube.com
does NOT block any page on youtube.com
, but only youtube.com
and that's it. To block youtube.com
AND any page on it, we would have to write youtube.com/*
.
To make it convenient for the user to block the homepage only, he can write either youtube.com
or youtube.com/
.
Please, feel free to check out #70. The most important file to look at, is find-rule.test.ts
, where are all the test scenarios I could think of. It would be nice to double check on that!
I have also added Examples section to README.
from block-site.
Absolutely, both blocking subdomains and wildcard support are fantastic additions! Excellent examples as well.
I'm eagerly anticipating this implementation.
from block-site.
Related Issues (20)
- Should we use cloud synced storage? HOT 4
- Feature Request - right click block site option HOT 8
- Bug - Extension icon not visible in incognito mode HOT 6
- Fix path shown in Blocked info page
- Timed blockage HOT 10
- Block Websites only in in incognito mode HOT 6
- Counter not visible in incognito mode. HOT 2
- Can we add a redirect function? HOT 4
- Minimal UI/UX updates HOT 8
- Better block page HOT 3
- Error: Could not load manifest on trying to load extension locally HOT 1
- Blocking home page only HOT 5
- Firefox Support 🔥🦊 HOT 30
- Optional context menu HOT 4
- Context Menu's functionality is not obvious HOT 2
- Support for regular expressions? HOT 3
- Blocking `x.com` blocks `nginx.com` HOT 5
- Password Protect HOT 2
- Why has Block Site stopped working? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from block-site.