Faphouse-HideWatched

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu betiği yüklemek için bir betik yöneticisi eklentisi yüklemeniz gerekecektir.

(Zaten bir betik yöneticim var, hadi yükleyelim!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

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