Eporner – Hide Watched Videos

Hide or grayscale already watched videos on eporner.com

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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         Eporner – Hide Watched Videos
// @namespace    http://tampermonkey.net/
// @version      1.1.0
// @description  Hide or grayscale already watched videos on eporner.com
// @author       orgacord
// @match        https://www.eporner.com/*
// @grant        none
// @license      MIT
// ==/UserScript==
(function() {
    'use strict';

    /**
     * CONFIGURATION
     * Choose how watched videos are treated:
     * "hide"      → completely remove them from the grid
     * "grayscale" → keep them visible but dimmed
     */
    const HIDE_MODE = "grayscale";

    const hiddenSet = new WeakSet();

    function hideWatched() {
        let count = 0;
        document.querySelectorAll('.mb').forEach(thumb => {
            if (hiddenSet.has(thumb)) return;

            const watchedIcon = thumb.querySelector('i[title^="Watched"]');
            if (watchedIcon) {
                if (HIDE_MODE === "hide") {
                    thumb.style.display = 'none';
                } else {
                    thumb.style.filter = 'grayscale(100%)';
                    thumb.style.opacity = '0.5';
                }
                hiddenSet.add(thumb);
                count++;
            }
        });

        if (count > 0) {
            console.log(`Processed ${count} watched video(s)`);
        }
    }


    hideWatched();

    const observer = new MutationObserver(hideWatched);
    observer.observe(document.body, { childList: true, subtree: true });
})();