Please sign in to access this page

Site Blocker

Site Blocker

29 devlogs
41h 36m
•  Ship certified
Created by Owen Lusis

It's a Firefox add-on that blocks certain websites of your choice.

Installation:
From the Firefox web store, or build from source. Building from source is more up to date, but I've updated the Firefox addon as of 2/7 for the ship.

Features
ㅤㅤ
- Block with advanced or simple regex
- Dark and Light mode
- Disable Blocking
- Redirect to custom page
- Pause blocking for some time
- Export settings to file
- Whitelist specific websites

Timeline

Fixed an error where JSON was being read incorrectly.

Update attachment

To be honest, that took far too long. 4 hours and 20 minutes for a simple feature is ridiculous. It's fine though because the feature is quite nice. Thanks to Jim Dinias for the idea, now that I finally understand it.

Update attachment

Ship 1

1 payout of shell 433.0 shells

Owen Lusis

about 1 month ago

Owen Lusis Covers 27 devlogs and 35h 54m

I added that feature so that you can pause being able to edit settings, and block/unblock websites. Unfortunately, I misread Jim Dinias' suggestion and coded the wrong feature. Anyway I still think this is a cool feature, and I'll probably code Jim's feature soon. I think I also created a bug, so I'll fix that too.

Update attachment

I have converted all my javascript code to typescript, so hopefully no annoying type related errors now. I also updated the Firefox addon listing, and published a github package.

Thanks to Jim Dinias for the idea, I am going to add a feature where you cannot modify settings for some amount of time.

Update attachment

I noticed I should probably keep consistency between the modules in my project, so I have converted the three remaining modules to mjs files.

Update attachment

I've gotten rid of all of those unnecessary css rulesets. Thankfully that didn't take too long. What I realised when I was doing this was that I never created a way of accessing the statistics page, so I added a button to the popup to access that too. I'm going to make that sort by times blocked soon.

Update attachment

So I was making the transition between light and dark and then I realised that I didn't need to do it in this way at all, and the new way is much more compact and useful. In hindsight I don't know why I thought this was necessary. So the way I was doing it before was:

`.className {
transition: background 0.3s;
}

:root.light-theme .className {
background: var(--background);
}

:root.dark-theme .className {
background: var(--background);
}`

But now I know that I only need this:

.className {
transition: background 0.3s;
background: var(--background);
}

Also I'm not sure if this will work properly with the markdown so it looks like code. Anyway I wrote 22 css rulesets like this, so I'm gonna fix them now....

Update attachment

Added a dark and light theme switch button to the popup button. I think I'll update the css so it fades between the two when switched.

Update attachment

Just some bug fixes this time.
- I realised I was chaining two DOMContentLoaded event listeners, so the second wouldn't run and add the click event listeners to the black list and whitelist buttons.
- Fixed setting a password for the first time.

Update attachment

This was a long one, over 4 hours. I have added a password system so that you can't change any settings or unblock sites with out the password.

Update attachment

Another one of those only a few line changes (it was 2) that required far too long to find the problem and fix it.

Update attachment

I added that transition for theme changes to the settings page. Sorry for the double cursor in the recording, can't find many google screen recorders that I can install easily for arch linux arm64 on a macbook silicon.

I added a statistics pages to see what sites you've blocked. Also I found this really cool way to make the background transition from light to dark mode and vice versa.

Update attachment

This was a quick one. I realised that the logic for showing the advanced regex warning was backwards. Fixed that!

Update attachment

I finally wrote a README for my project.

Update attachment

I added a feature where you can import and export your settings to a file.

Update attachment

Yeah I kinda realised that having 13 files in the top level directory probably wasn't the best organisation, so I created some folders to store stuff.

Update attachment

I've added a button to the context menu to block the current webpage.

Update attachment

Now you can redirect yourself to a different page instead of the default one.

Update attachment

I've added a dark theme to the redirect page.

Update attachment

I added a little warning box that shows when advanced regex checking is enabled.

Update attachment

I've added a setting to check against an actual regex instead of my simplified version.

Update attachment

I have replaced the simple checking system with a very simplistic regex checking but only the wildcard () is checked (it is also replaced with '.' as that is regex for any amount of any character). I also added a simple help section below it.

Update attachment
Owen Lusis Owen Lusis about 2 months ago
Nope, I guess the comment isn’t in markdown. Okay it’s * for the wildcard and replaced with ‘.*’. Finally got there.
Owen Lusis Owen Lusis about 2 months ago
Oops, didn’t realise this is markdown I think I’ve got to add a backslash in front of the asterisks, so I meant the wildcard is \* and it is replaced with .\*.

Forgot to add a way of accessing settings last time, so now I have added a floating button in the popup.

Update attachment

I have added better dark and light theming, and the ability to disable website blocking for some amount of minutes.

Update attachment

I have finally added dark mode, but it doesn't look great. Oh well. Anyway I added a settings page to customise stuff like dark mode and temporary disabling the blocker.

Update attachment

Now I have added a whitelist feature so you can access specific sites even though the domain is blacklisted.

Update attachment

I have added a simple menu to add and remove the blocked websites, and also made it so that any prepended www. is removed when checking if the website should be blocked.

Update attachment

As of right now, there is only a simple redirect and it only works on example.com. My plan is now to add a simple menu on the click button to select the websites.

Update attachment
Owen Lusis Owen Lusis about 1 month ago
That’s a good idea thanks, I’ll implement that soon.
jim jim about 1 month ago
pretty sick, you can add a lock feature that locks sites for etc 10hours and doesnt let users change the settings for them