Hide Ad Profiles on OnlyFansSigns

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

  1. // ==UserScript==
  2. // @name Hide Ad Profiles on OnlyFansSigns
  3. // @namespace http://tampermonkey.net/
  4. // @version 2.2
  5. // @icon https://www.google.com/s2/favicons?domain=onlyfans.com
  6. // @description Dynamically blocks fake profiles or ad profiles across multiple platforms, with specific handling for Fanscout ads.
  7. // @author Cody JORDAN
  8. // @match https://fanscout.com/*
  9. // @match https://onlyselects.com/*
  10. // @match https://onlyfanssigns.com/*
  11. // @grant none
  12. // @run-at document-end
  13. // ==/UserScript==
  14.  
  15. (function () {
  16. 'use strict';
  17.  
  18. /**
  19. * Hides ad profiles based on attributes, classes, and keywords.
  20. */
  21. function blockAdProfiles() {
  22. const profiles = document.querySelectorAll('.swiper-slide, .slide-content, .profile-card, .account-card');
  23.  
  24. profiles.forEach(profile => {
  25. const isPromo = profile.hasAttribute('data-promo'); // Promo marker
  26. const hasImptrc = profile.hasAttribute('data-imptrc'); // Impression tracking marker
  27. const hasClctrc = profile.hasAttribute('data-clctrc'); // Click tracking marker
  28. const adsElement = profile.querySelector('.ads'); // Ad-related class
  29. const usernameElement = profile.querySelector('a'); // Username or profile link
  30.  
  31. const adTextMarkers = ['AD', 'Sponsored', 'Promo', 'Advertisement']; // Ad keywords
  32.  
  33. // Identify fake or ad profiles
  34. const isFakeProfile =
  35. isPromo ||
  36. hasImptrc ||
  37. hasClctrc ||
  38. (adsElement && adTextMarkers.some(marker => adsElement.textContent.includes(marker))) ||
  39. (usernameElement && adTextMarkers.some(marker => usernameElement.textContent.includes(marker)));
  40.  
  41. if (isFakeProfile) {
  42. console.log('Hiding fake profile:', profile);
  43. profile.style.display = 'none';
  44. }
  45. });
  46. }
  47.  
  48. /**
  49. * Monitors the DOM for dynamically loaded content.
  50. */
  51. function observeDomChanges() {
  52. const observer = new MutationObserver(() => {
  53. blockAdProfiles();
  54. });
  55.  
  56. observer.observe(document.body, {
  57. childList: true,
  58. subtree: true,
  59. });
  60. }
  61.  
  62. /**
  63. * Initializes the script.
  64. */
  65. function init() {
  66. console.log('Universal Profile Ad Blocker Initialized.');
  67. blockAdProfiles();
  68. observeDomChanges();
  69. }
  70.  
  71. // Execute the script
  72. init();
  73. })();