FUQ Blacklister

Delete unwanted fuq.com videos with a list of blacklisted keywords (see code for the list)

  1. // ==UserScript==
  2. // @name FUQ Blacklister
  3. // @version 0.9
  4. // @description Delete unwanted fuq.com videos with a list of blacklisted keywords (see code for the list)
  5. // @description:de Unerwünschte Videos mit einer Blacklist von fuq.com entfernen (siehe Code für die Liste)
  6. // @description:fr Supprimer les vidéos indésirables de fuq.com avec une liste noire (voir le code pour la liste)
  7. // @description:it Rimuovere i video indesiderati da fuq.com con una lista nera (vedi codice per la lista)
  8. // @author J.H
  9. // @include *fuq.com*
  10. // @icon https://www.google.com/s2/favicons?sz=64&domain=fuq.com
  11. // @grant none
  12. // @license MIT
  13. // @run-at document-end
  14. // @namespace https://greasyfork.org/users/448067
  15. // ==/UserScript==
  16.  
  17. // SETTINGS
  18. const debug_info = true; // show debug info in console (blacklisted videos, blacklisted words in the video title)
  19. // Default blacklisted keywords (can be changed in the code)
  20. // for some words add space after/before the word, to avoid false positives (e.g. "mother " will not match "motherfucker")
  21. const blackList = [
  22. // incest
  23. "stepbro", "stepsis", "step bro", "step sis", "step sis", "step-bro", "step-sis", "stepdad",
  24. "step dad", "step-dad", "stepsib", "step sib", "step-sib", "stepmom", "step mom",
  25. "step-mom", "stepson", "step son", "step-son","stepaunt", "step aunt", "step-aunt",
  26. "stepuncle", "step uncle", "step-uncle", "stepcousin", "step cousin", "step-cousin",
  27. "sister's", "father ", "mother ", "daughter", "daddy", "sister ", "brother", "stepfather",
  28. "mommy", "granny", "family", " sister", "sis ", "bro ", "step-father", "step father",
  29. "step-mother", "step mother", "stepmother", "grandma", "mom ", "moms ",
  30. "soeur", "sœur", "papa", "maman", "fils", "frère", "frere", "frangine", "cousine", // in french
  31. "famille", "mère", "familiale", "dad ", "niece",
  32. // no straight safe
  33. "trap ", "futa", "trans ", "transgender", "shemale", "trann", "cuck", "fatboy",
  34. "sissy", "femboy", "femboi", "tgirl ", "travest", "crossdresser", "pegging",
  35. "t-girl", "ladyboy", " tgirl", "transgirl", "tbabe ", "ts ", "tgirls ", " tgirls",
  36. "prostate",
  37. // for woman
  38. "fpov", "female pov", "female point of view", "female perspective", "girlsrimming",
  39. "pov femme", "femme pov", "point de vue féminin", "point de vue femme", // in french
  40. // violence/extreme/..
  41. "rape ", "pee", "piss ", "femdom",
  42. "pipi", // in french
  43. // other
  44. "babysitter", "baby sitter", "baby-sitter", "doll ", "escort ", "feet", "foot ",
  45. "ado ", "married", "mature ", "strapon", "cougar", "bbw",
  46. "poupée", "poupee", "escorte ", // in french
  47. ];
  48. // END OF SETTINGS
  49.  
  50. const colorPrint = function (videoTitle, ...args) { // debug info printing function
  51. args = args.filter(arg => arg !== 0); // remove arguments that contain 0
  52. console.log('%c[FUQ Blacklister]:%c ' + videoTitle + ' %c[removed]', clr_s[2], clr_s[1], ...args, clr_s[3]);
  53. }, clr_s = ["color: red", "color: white", "color: #f90", "color: green"]; // color settings (for debug info)
  54.  
  55. const divs = document.querySelectorAll(".card-container.sub");
  56. divs.forEach((div) => { // loop through all elements from the divs and find the title
  57. // shitty way to get the video title because the data-title attribute is not available on mobile
  58. let videoTitle = div.querySelector("a").getAttribute("title");
  59. if (videoTitle) { // if the video title is found
  60. blackList.forEach((blackWord) => { // loop through all blacklisted words
  61. if (videoTitle.toLowerCase().includes(blackWord)) { // if videoTitle contains blacklisted word
  62. const start = videoTitle.toLowerCase().indexOf(blackWord), end = start + blackWord.length;
  63. if (blackWord[blackWord.length - 1] == " ") { // check if the blacklisted word finish with a space, if it does, check if it's a word
  64. const beforeAndAfter = videoTitle.toLowerCase().substring(start - 1, end + 1); // get the character before and after the blacklisted word
  65. if (beforeAndAfter[0] != " " && beforeAndAfter.startsWith(blackWord) == false) {
  66. return;
  67. }
  68. }
  69. div.remove(); // remove the video element
  70. if (debug_info) { // allow printing of debug info
  71. // add %c before/after every blacklisted word in the video title
  72. videoTitle = videoTitle.substring(0, start) + "%c" + videoTitle.substring(start, end) + "%c" + videoTitle.substring(end);
  73. }
  74. }
  75. });
  76. if (debug_info) { // allow printing of debug info
  77. const count = (videoTitle.match(/%c/g) || []).length / 2; // count how many blacklisted words in the video title
  78. if (count > 0) { // if count is greater than 0, print debug info
  79. colorPrint(videoTitle, // little hack to print debug info in the console with red color for the blacklisted words
  80. count > 0 ? clr_s[0] : 0, count > 0 ? clr_s[1] : 0, count > 1 ? clr_s[0] : 0, count > 1 ? clr_s[1] : 0, count > 2 ? clr_s[0] : 0, count > 2 ? clr_s[1] : 0,
  81. count > 3 ? clr_s[0] : 0, count > 3 ? clr_s[1] : 0, count > 4 ? clr_s[0] : 0, count > 4 ? clr_s[1] : 0, count > 5 ? clr_s[0] : 0, count > 5 ? clr_s[1] : 0
  82. );
  83. }
  84. }
  85. }
  86. });