Sleazy Fork is available in English.

Reddit Sellers Filter

Hide posts by onlyfans and other sellers

  1. // ==UserScript==
  2. // @name Reddit Sellers Filter
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.01
  5. // @description Hide posts by onlyfans and other sellers
  6. // @author nvrmnd
  7. // @match https://old.reddit.com/*
  8. // @exclude https://old.reddit.com/user/*
  9. // @icon https://www.google.com/s2/favicons?domain=reddit.com
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. if (window.top != window.self) {
  15. //-- Don't run on frames or iframes
  16. return;
  17. }
  18. console.log("🐒🔧💥");
  19. 'use strict';
  20.  
  21. setInterval( main, 5000 );
  22. })();
  23.  
  24. function main() {
  25. //console.log( "ONLYFAN FILTER TRIGGERING" );
  26. var $ = window.jQuery;
  27. var jQuery = window.jQuery;
  28.  
  29. // Put any sellers you still want to see here, comma-delimited and lower-case
  30. var exceptionsList = ["some_user_name", "some_other_user"];
  31.  
  32. // The RegEx of things to exclude; the first part tries to avoid excluding people saying things like "I don't have an onlyfans!"
  33. // If you want to add something, just slap it on the end like |(my new phrase)
  34. var sellerMatches = "(?<!(no )|(don't have )|(don't have an ))(([Oo]nly[Ff]ans)|([Oo]nly.*[Ff]ans)|(ONLYFANS)|(OF)|([Tt][Oo][Pp] [\d.]+%)|(linktr.ee)|(allmylinks)|([Hh]utt.co)|($[/d.]+)|(on sale)|(current sale)|(custom content))";
  35. var sellerRegEx = new RegExp( sellerMatches , "m" );
  36.  
  37. $( ".thing" ).each(function() {
  38. var rThing = $( this );
  39. if( rThing.attr("data-sellerFilter") == "scanned" ) { return; } // Don't run on users we already filtered
  40.  
  41. var rUser = rThing.attr( "data-author" );
  42. if( rUser !== undefined ) {
  43. // Mark it so we don't have to scan it again
  44. rThing.attr('data-sellerFilter', 'scanned');
  45.  
  46. // Skip exceptions
  47. if( exceptionsList.indexOf(rUser.toLowerCase()) > -1 ) {
  48. console.log( rUser, ": SKIPPING EXCEPTION" );
  49. return;
  50. }
  51.  
  52. // Use API to get the about page for the user via AJAX
  53. $.getJSON('https://www.reddit.com/user/'+rUser+'/about/.json', function(jd) {
  54. // Get their public description
  55. var rPubDesc = jd.data.subreddit.public_description;
  56. if( rPubDesc !== "" ) {
  57. // Try and find seller keywords in user description and hide those posts
  58. //console.log( rUser, rPubDesc );
  59. if( rPubDesc.search(sellerRegEx) >= 0 ) {
  60. console.log( rUser, ": FILTERED");
  61. rThing.css( "display", "none" );
  62. }
  63. }
  64. });
  65. }
  66. });
  67. }