Hide Ad Profiles on OnlyFansSigns

Dynamically blocks fake profiles or ad profiles across multiple platforms, with specific handling for Fanscout ads.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Hide Ad Profiles on OnlyFansSigns
// @namespace    http://tampermonkey.net/
// @version      2.2
// @icon         https://www.google.com/s2/favicons?domain=onlyfans.com
// @description  Dynamically blocks fake profiles or ad profiles across multiple platforms, with specific handling for Fanscout ads.
// @author       Cody JORDAN
// @match        https://fanscout.com/*
// @match        https://onlyselects.com/*
// @match        https://onlyfanssigns.com/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function () {
    'use strict';

    /**
     * Hides ad profiles based on attributes, classes, and keywords.
     */
    function blockAdProfiles() {
        const profiles = document.querySelectorAll('.swiper-slide, .slide-content, .profile-card, .account-card');

        profiles.forEach(profile => {
            const isPromo = profile.hasAttribute('data-promo'); // Promo marker
            const hasImptrc = profile.hasAttribute('data-imptrc'); // Impression tracking marker
            const hasClctrc = profile.hasAttribute('data-clctrc'); // Click tracking marker
            const adsElement = profile.querySelector('.ads'); // Ad-related class
            const usernameElement = profile.querySelector('a'); // Username or profile link

            const adTextMarkers = ['AD', 'Sponsored', 'Promo', 'Advertisement']; // Ad keywords

            // Identify fake or ad profiles
            const isFakeProfile =
                isPromo ||
                hasImptrc ||
                hasClctrc ||
                (adsElement && adTextMarkers.some(marker => adsElement.textContent.includes(marker))) ||
                (usernameElement && adTextMarkers.some(marker => usernameElement.textContent.includes(marker)));

            if (isFakeProfile) {
                console.log('Hiding fake profile:', profile);
                profile.style.display = 'none';
            }
        });
    }

    /**
     * Monitors the DOM for dynamically loaded content.
     */
    function observeDomChanges() {
        const observer = new MutationObserver(() => {
            blockAdProfiles();
        });

        observer.observe(document.body, {
            childList: true,
            subtree: true,
        });
    }

    /**
     * Initializes the script.
     */
    function init() {
        console.log('Universal Profile Ad Blocker Initialized.');
        blockAdProfiles();
        observeDomChanges();
    }

    // Execute the script
    init();
})();