Faphouse-HideWatched

Removes watched videos from the feed. The next unwatched video takes it place so there are no obvious side-effects.

Você precisará instalar uma extensão como Tampermonkey, Greasemonkey ou Violentmonkey para instalar este script.

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

Você precisará instalar uma extensão como Tampermonkey ou Violentmonkey para instalar este script.

Você precisará instalar uma extensão como Tampermonkey ou Userscripts para instalar este script.

Você precisará instalar uma extensão como o Tampermonkey para instalar este script.

Você precisará instalar um gerenciador de scripts de usuário para instalar este script.

(Eu já tenho um gerenciador de scripts de usuário, me deixe instalá-lo!)

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

(Eu já possuo um gerenciador de estilos de usuário, me deixar fazer a instalação!)

// ==UserScript==
// @name         Faphouse-HideWatched
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Removes watched videos from the feed. The next unwatched video takes it place so there are no obvious side-effects.
// @author       echo17
// @match        *://*.faphouse.com/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Function to find and remove the watched elements
    function removeWatchedVideos() {
        // Find all spans with the specific class
        const watchedSpans = document.querySelectorAll('span.t-vw');

        watchedSpans.forEach(span => {
            // Verify the text says "Watched" just to be safe
            if (span.textContent.trim() === 'Watched') {
                // Traverse up the DOM tree to find the main container div
                const parentDiv = span.closest('.thumb');

                // If the parent is found, remove it from the page
                if (parentDiv) {
                    parentDiv.remove();
                }
            }
        });
    }

    // 1. Run once on initial page load
    removeWatchedVideos();

    // 2. Set up a MutationObserver to handle dynamically loaded content (infinite scrolling)
    const observer = new MutationObserver((mutations) => {
        for (const mutation of mutations) {
            if (mutation.addedNodes.length > 0) {
                removeWatchedVideos();
            }
        }
    });

    // Start observing the document body for newly added HTML
    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();