Coder Social home page Coder Social logo

Comments (2)

Svenito avatar Svenito commented on July 18, 2024

+1 for this. Perhaps a whitelist/exclusion list. Specifically for subdomains or things like subreddits. Would be very useful.

from website-blocker-chrome.ext.

Libervurto avatar Libervurto commented on July 18, 2024

I agree that this would be a useful feature, however, I am a fan of the scripting style of the extension and would prefer to see that expanded upon rather than introduce special lists. I think even the new 'days of the week' feature should have been implemented as part of the scripting. e.g.

twitter.com 1000-1259 mon

would block only twitter for a time period on Mondays. Alternatively one could block twitter for the entirety of Monday:

twitter.com mon

Or we could block twitter for the working week:

twitter.com 0900-1700 mon-fri

White-listing could also be done via scripting, by prefixing a domain or partial URL with '!' (commonly used to mean 'not'). Using the reddit example above we could achieve the desired block with something like this

reddit.com !/r/leagueoflegends 0930-2300

To appreciate how this line works it's better to read it right to left: if the time is between 0930-2300, and the URL does not include "!/r/leagueoflegends", and the domain is "reddit.com", then block the page.

we can use the '!' to great effect with other parameters too. Say we only want to allow facebook visits between 1700 and 2200, normally this would require blocking the rest of the day like so

facebook.com 0000-1659,2200-2359

which is a bit messy and not immediately obvious, but utilising '!' the same thing would look like this

facebook.com !1700-2200

One example I would find '!' useful is that after certain time at night I only want .org and .ac.uk sites to be accessible. I don't think this is possible with the extension in its current state but it could be achieved like so:

!(.org|.ac.uk) !0800-2300

See I even used another '!' for the time because it was easier to work out that way.

You could also easily make a white-list like so:

!(reddit.com/r/leagueoflegends/|twitter.com|youtube.com)

but that's ugly, so I would much prefer a multi-line format like this:

!{
reddit.com/r/leagueoflegends/
reddit.com/r/crayons/
reddit.com/r/pie/
reddit.com/r/grapefruit/
}
(yeah those were the random words I came up with)

One more symbol I'd like to be introduced is '', which stands for any number of random characters, i.e. "How now brown cow" = "How now * cow" = "Hw now " = "Hw". This would have many uses but a fun one is the ability to block the entire internet with a single character,

*

This joke brings up an important point. If such symbols are implemented then '!' must take precedence over '*', that is to say white-listing must take precedence over blocking. We have to be able to visit github after all!

* !github.com

from website-blocker-chrome.ext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.