1337x NSFW Hider

Hides 18+ content

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         1337x NSFW Hider
// @namespace    http://tampermonkey.net/
// @version      2024-12-04
// @description  Hides 18+ content
// @author       DamienKnight
// @match        *.1337x.to/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Dictionary of terms to search for (case-insensitive)
    const terms = ["Affair", "Anal", "Ass", "Audition", "BBC", "BFF", "Bitch", "Black", "Bloomer", "Blow", "Boss", "Brat", "Brazzers", "Brother", "Busty", "Caught", "Cheat", "Cheek", "Come", "Commando", "Creampie", "Cum", "Deep", "Delivery", "Desire", "Dick", "Exploit", "Family", "Fuck", "Gangbang", "Girl", "Horny", "Hot", "Husband", "Love", "Lust", "Mature", "MILF", "Mom", "Mother", "Neighbor", "NewSensations", "Office", "Oiled", "Onlyfans", "Passionate", "Perfect", "Perv", "Pussy", "Racy", "Raw", "Rough", "Secret", "Seduce", "Sex", "Sister", "Slick", "Slut", "Squirt", "Step", "Stroke", "Suck", "Swap", "Taboo", "Therapy", "Tight", "Tits", "Wife", "Young", "XXX"];

    // Function to check if href contains any term from the dictionary (case-insensitive)
    const containsTerm = href => terms.some(term => href.toLowerCase().includes(term.toLowerCase()));

    // Hide <li> with links containing any term in the dictionary
    document.querySelectorAll('li a[href]').forEach(link => {
        if (containsTerm(link.href)) {
            link.closest('li').style.display = 'none';
        }
    });

    // Hide <tr> with links containing any term in the dictionary
    document.querySelectorAll('tr a[href]').forEach(link => {
        if (containsTerm(link.href)) {
            link.closest('tr').style.display = 'none';
        }
    });

    // Hide <div> with the class "list-box hidden-sm" (Affiliate Links on the Sidebar)
    document.querySelectorAll('div.list-box.hidden-sm').forEach(div => {
        div.style.display = 'none';
    });

})();