Porn Site Blocker

Blocks specific adult websites

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Porn Site Blocker
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Blocks specific adult websites
// @author       You
// @match        *://*/*
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    
    const redirectUrl = 'https://www.bible.com';
    
    const blockedDomains = [
        'pornhub.com',
        'xvideos.com',
        'xnxx.com',
        'youporn.com',
        'redtube.com',
        'xhamster.com',
        'spankbang.com',
        'tube8.com',
        'brazzers.com',
        'onlyfans.com',
        'chaturbate.com',
        'livejasmin.com',
        'stripchat.com',
        'bongacams.com',
        'cam4.com',
        'myfreecams.com',
        'adultfriendfinder.com',
        'flirt4free.com',
        'pornhd.com',
        'pornmd.com',
        'youjizz.com',
        'thumbzilla.com',
        'eporner.com',
        'beeg.com',
        'porntrex.com',
        'pornone.com',
        'hclips.com',
        'porn.com',
        'tnaflix.com',
        'drtuber.com'
    ];

    const currentDomain = window.location.hostname.toLowerCase();
    
    for (let domain of blockedDomains) {
        if (currentDomain === domain || currentDomain.endsWith('.' + domain)) {
            window.location.replace(redirectUrl);
            break;
        }
    }
})();