Eporner – Hide Watched Videos

Hide or grayscale already watched videos on eporner.com

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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 });
})();