Giter Site home page Giter Site logo

ray-lothian / block-site Goto Github PK

View Code? Open in Web Editor NEW
216.0 216.0 39.0 492 KB

A browser extension to block website access using hostname matching

Home Page: https://add0n.com/block-site.html

License: Mozilla Public License 2.0

JavaScript 92.51% CSS 2.63% HTML 4.87%

block-site's People

Contributors

guiforge avatar omeritzics avatar ray-lothian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

block-site's Issues

Provide a version for Android

I was saddened to see that I can not install this for my android. Is there a chance that you could provide this for android?

simple statistics

when blocking takes place it would be nice to be able to extract data about which site got blocked and at what time. As CSV or JSON. Exposed via url

Cloud Sync

Hello, please add cloud sync (Dropbox)
Thanks.

Bug: Doesn't work on Kiwi browser Android.

Kiwi browser is the Chrome clone for Android and it supports all Chrome extensions. I already use extensions like uBlock Origin, HoHSER etc.

When I try block-site, the extensions doesn't detect the current tab but sends empty notification that

"Not tab with id: 50."

Block protocols

I#m looking for a tool which allowe me to block protocols, e.g. "file://" or "ftp:" (this is not possible with FF built in functions). Is it possible with Block Site?
Thanks!

Youtube search Bypasses filter

Youtube's search function seems to bypass the filter altogether. Using the filter by keyword for 'legs' and then performing a search for 'legs' using the search box on YouTube allows you to load the search results for 'legs' but if you were to copy and paste the url, refresh the page, or access the page by any other means it would be blocked as normal.
The issue is replicable on Instagram too. I could not replicate the problem with Google, Gmail, Yahoo, tumblr, reddit, or Quora searches so It works as intended there.

Easy access to settings from toolbar icon

Hi!

Love the extension, and its simple "just works" functionality. However, the UI I need to interact with to block pages is a bit hard to use. Specifically, I can very easily block the current page, but only if I want to block the entire domain. And if I'm on a whitelist rather than a blacklist, this easy block functionality does nothing.

Instead, to edit the blocklist, I need to go through the following steps:

  • right click on icon
  • "manage extension"
  • in the Add-ons Manager, click on the triple-dot icon
  • select "Preferences"

Then I can go and actually add the site, then save. But 4 steps for my most common action in this plugin seems less than ideal. What would you think of adding a "Configuration" shortcut to the icon's submenu, or maybe even giving an option where clicking on the icon opens the configuration in a new tab, rather than blocking the current website?

Thanks!

Allow multiple block times per day

I want to allow a site to be viewable during only a certain time slot in the day. This requires being able to set up two time slots of blocking in a day.

The easy way to implement this would be to add a toggle to flip the blocking schedule so that the times entered represent the time slot when a site is allowed to be viewed, rather than when it is blocked.

The more flexible way would be to allow any number of time slots to block in a day.

Bug report

This link opens even though I have disabled the *://*.google.com/*.
I'm reporting this because there might be other similar links which passes through the filter.

The trailing / in the rules causes the blocking to not work sometimes

When adding a website, a / is always added automatically to the end. However, this causes the blocking to sometimes fail:

For example, if I want to block, e.g. www.reddit.com/r/soccer

If I enter the URL, it will become https://www.reddit.com/r/soccer/*

When I visit the website, since the URL in the browser is actually https://www.reddit.com/r/soccer, the rule doesn't match, and the blocking doesn't happen.

Only when I try to visit a subpage, e.g. https://www.reddit.com/r/soccer/comments/aaa, does the blocking happen.

This is especially problematic on Android. You can easily reproduce the issue with Firefox Beta on Android, I believe.

I think this should be easy to fix?

list of domains instead of 1 by 1 entry

Could it be possible to have just one big textbox to fill in domain to block or allow like the chrome extension SiteBlock 0.2.4. ? That way it is far easier to keep a list somewhere offline or copy it from one to another browser.

In Siteblock 0.2.4 it goes like this:
Help
List the websites you want to block, one per line. For example:

cnn.com
nytimes.com
google.com/news

If you would like to block all sites except for a select few, enter a '*' on the first line and the websites you wish to allow with a '+' before each line. For example:

*
+stackoverflow.com
+msdn.microsoft.com

Block-Site is not working

Hello.
In the module manager the icon of your block site is grayed out and inoperative, with Firefox 66.0.5 (64 bits) and Windows 10 (x64) 1809.
Why? Can you help me?
Thank you.
Regards.
See
Block-Site

Feature request: better phishing protection usage

Hey, feature request here.

I am using your addon to protect myself from phishing. So I use it kind off like uMatrix (similar to NoScript) where I unblock the web as I "discover" it. Meaning when I am about to visit an undiscovered site it gets blocked by this addon and I need to manually check the URL (see whether it is spelled right and not a phishing domain). When the URL is good, I want to be able to easily/quickly add it to the whitelist, as I will do this quite frequently. Clicking the addon icon would be a ok-solution (once this bug is fixed), but I would love if this plugin took it one step further in terms of UserExperience and had the following added to its blocking screen:

  • show the domain name with its TLD, without subdomain, path or params (big font size) in order to more easily and faster identify wrong typed/mispelled domains
  • a button to add the blocked page to the whitelist, with generous wildcards, eg *://*github.com*/*. So it behaves like the addon icon.

And also: great addon, I love the simplicity!

[bug] Editing html buttons lets you re-enable them and bypass master password

If you edit the DOM element of the buttons in the settings, you can bypass the master password. E.g. json import is disabled (because importing overwrites the master password if hash isn't specified) because you've set a master password, if you edit the DOM element and remove disabled="" or change it to enabled="", it allows you to import a json because there's no security check.

image

Presumably, this can be bypassed by generating a security token once the master password has been inputted and accepted that lasts for the entire session; as long as the page is open or for a certain amount of time. This would be nice if it was configurable.

can't unblock URL, no sites listed after being blocked

I tried installing Block Site 0.21 for Opera and it didn't work -- no Block Domain option appeared when I right click. I then installed version 0.18 and the right-click option to Block Domain is there and works. However, when I go to the Block Site Options Page, none of the domains I blocked is listed if I wanted to unblock them.

Whitelist stopped working

I set up block-site weeks ago on my kids profiles and it blocked as expected.

But when I now logged into their profiles I was able to use unrestricted internet for 15 minutes - what is going on here???

Whitelisting pages with addon icon adds the blocking-pages address

Clicking the addon icon while in whitelist mode only adds addon-address (moz-extension://[...]/) to the whitelist! I do not think that is intended and I would love to see it add the domain the user is about to access to the whitelist with a configurable wildcard setting for subdomains, paths and params instead.

prevent Disable / Uninstall on Firefox for Android

FAQ # 9 specifies the proper location for the policies.json file, but I believe that only applies to PCs. If it is possible to prevent the extension from being disabled or uninstalled from Firefox running on Android, what are those Android-specific instructions? (I cannot find a Firefox installation directory on my Android phone.) Thanks.

Domain block note/info.

After a bit of testing it seems that the advised "*://*keyword*/*" variation, to specify domain-part only blocks, also acts on the url path.

In general this is not something that would show up quickly.
(really rare, when one is using something like "*://*google.com*/*")

But when trying to block a specific net designator (ie: ".com" or ".nl") this will have a higher level of triggering the occasional bad blocking cases when "com" or "nl" is precent in the url-path.
(a issue for sites that make use of random id's in there paths. Like for example google's gmail pages)

Example:

  • Block spec: "*://*.nl*/*"
  • Url: "www.google.nl": Blocked - as expected.
  • Url: "www.google.com/nl": Blocked - not expected. (+ seems to also ignore the leading dot in the block spec)

Workaround:
Although I could not find any info about potential character escaping support in/for Block-site. Escaping the leading dot in the domain-block spec seems to do the trick.

  • Block spec: "*://*\.nl*/*"
  • Url: "www.google.nl": Blocked - as expected.
  • Url: "www.google.com/nl": Not blocked - as expected.
    (as far as I know dots are not used (allowed?) in the url path part. rendering the escaped-dot block variant 'virtual' foolproof)

The issue, if any ... not sure.
Could be seen as (the intended) domain-blocks being a bit to greedy.
Or the domain-block doc needing a bit of additional info.

(Tested against Block-Site version 0.2.2.1)

Reverse Mode with Scheduling

Hello,

I'm trying to block all sites, except for 1 site for 1 hour a day. I thought if i said to block that 1 site for the specified hours each day, the reverse mode would reverse it so that is the only site available during those hours and no other sites are available outside of those hours. Basically it would be block all site except for this site during that hour.

What I'm gathering is the schedule just turns off the extension all together.

I'm wondering, is there any way to achieve what I'm trying to do - have all site blocked all hours of the day, except for one hour of the day where just one site is available.

Feature Request: Pause Blocking

Many of the sites I block for productivity I would like to access on leisure time, and having to re-enter master passwords makes for a bad UX. The ability to pause blocking on-demand would make that use case considerably smoother

location of the configuration file

Thanks for such a great tool.
Can you please share the location of the configuration file?
I am considering changing it programatically to reward children according to their performance on another app.
PS: I am using Firefox on Windows 10.

Feature Request: Autosave

First of all, thanks for this nice plugin.
Every time I edit the options Page I forget to save the options. First I thought the app is not working, than I figured out that there is a save button, but still I tend to forget this. Specially when you add some regex this is annoying.

I can't use the master password

Whenever i input a password to restrict access to the options and hit 'save', it dosen't work. There is no "saved successfully" answer

Doesn't work properly

Add-on doesn't close the tab or window automatically as it should. I put 1 instead of 0 in options, so it must close the blocked tab after 1 second. After blocking a website it starts counting from 1 second to zero then instead of closing continue counting in minus. Infinitely.

Block-Site completely ignores anything I tell it to do in any way

Hello,
I would be grateful if you could help me to make Block-Site work.
I installed it (tried several times, also restarting Firefox) but it does not accept any input.

Icon method:
I visit a website I want to block, click on the W icon, the popup asks me confirmation that I want to block that website, I accept, but nothing changes. It's as though I never did the procedure.
I open Block-Site settings, manually enter the url of a website I want to block, I click the Add button but it ignores my clicks, as if I didn't write anything in the field, or as if I didn't click the button. I tried with several different sites, both writing and not writing "http" and "www".
I create a TXT file of files to block according to instructions, I click on the "Import Rules (TXT File)" button, but it does absolutely nothing, as if the button doesn't exist.

Any clue of what might be going on?
Thanks so much.

wildcards do not work for whitelist

HI,

Great extension, using whitelist mode to prevent my son from wasting time during classes. Unfortunately, looks like whitelisting only works for FQDN in URL, so I have to do multiple unblocks when trying to add any new site. E.g., he needed access to smartmusic.com, but to get it completely working, I had to also add explicitly asm.smartmusic.com, auth.smartmusic.com, admin.smartmusic.com, etc. which was unwieldy.

Time Restriction to Block Sites Happens 24/7

While using the extension, the site does not block the sites within a certain time but blocks all the time. Only the sites I have listed are blocked 24/7, instead of the time frame I have listed.

Attached is my preference file, unless I have something set wrong. I changed it from .json to .txt so I could upload it here.
block-site-preferences-3.txt

Time Defines for Blocking Sites

Hey, really like this extension, much better than a couple of the others I tried, which were shockingly bad.

But I do have one issue: the "only block sites between" feature doesn't seem to be working. When I type in a time into the box, the -- get replaced by what I type, but when I get to the last pair of --, it no longer takes the input and replaces the dashes. Then it doesn't save any of what I entered and it all reverts to --.

Sort of the same story with days, that doesn't seem to affect what is blocked/not blocked, everything on the list is still blocked regardless of changing that setting. I'm also not sure whether those are days that it is blocked or days that it isn't blocked, because right next to Days: it says Exception List:, but the instructions in the FAQ seem to imply that those, like the time, are also specifying when they are blocked. Any help navigating these issues would be awesome. Thanks in advance!

domain range blocking

Is it possible to block a particular domain type ?

Like for example "*.google.com/".
... (ie: blocking all url's that contain ".google.com" in the domain name) ... + (including the domain without trailing/closing "/")
... (or, for example blocking any and all ".com" domains)

Would be a nice thing if this was possible ... especial this week.

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.