Faphouse-HideWatched

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

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