How to prevent the browser from loading a web app in vanilla JavaScript?

I wrote the following script which I run with Greasemonkey/Tampermonkey. It’s purpose is to prevent me from accessing a few web apps (web sites), usually sites I feel a bit addicted to. This is the closest I got to prevent my Browsers to display these sites sites:

// ==UserScript==
// @name        blocko
// @include     *
// ==/UserScript==

window.addEventListener('load', function() {
    let sites = ['example-1.com', 'example-2.com', 'example-3.com'];
    let regex = /..+/;
    let href = window.location.href;
    for (let i = 0; i < sites.length; i++) {
        if (href.includes(sites[i])) {
            let domain = sites[i].replace(regex, '');
            document.body.innerHTML =`
                

Enough with this ${domain} bullshit!

`; } } }, true);

I must say I’m not very satisfied from my achievement here because this script gets me into the site and I need to wait 1/2/3/4 or even 5 or more seconds in rare cases, until the site will vanish and the message I print to the screen with red background will appear instead. Thus I’m unwillingly exposed to the site’s content, from which I want to avoid.

I know that it is indeed possible to prevent the browser from even moving into a website through JavaScript: There is a Chrome addon named “BlockSite” that helps with this and I tried to have a look in it’s (huge) source code but I failed to understand how it prevents the user to even move into the website, unlike my script above that moves the user to the website but vanishes the website with a message after a few seconds (after the load event was triggered).

Please share a way or at least name a way in the comments to totally prevent yourself of moving into a website, as with “BlockSite”.

Sending notification email from Javascript/Tampermonkey/Greasemonkey (without Server)

I need to send notifications from frontend, notifications are going to have analytical data from website being monitored with Tampermonkey Chrome extension.

Is this possible?

Thanks in advance.