Unfuck Pornhub 2

Hide videos on Pornhub by title with regex. Currently blocks incest titles.

  1. // ==UserScript==
  2. // @name Unfuck Pornhub 2
  3. // @namespace none yet
  4. // @match *://*.pornhub.com/*
  5. // @grant none
  6. // @version 2.1
  7. // @author Kvothe (original code), fakeanatomydoctor (regex)
  8. // @description Hide videos on Pornhub by title with regex. Currently blocks incest titles.
  9. // ==/UserScript==
  10.  
  11.  
  12. // WORD BLOCK LIST (supports regex, can make a copy and change these terms to whatever you like)
  13. let wordList = ["sis", "step", "bro", "mom", "mother",
  14. "dad", "father", "uncle", "n[ei]{2}ce", "nephew", "aunt",
  15. "daughter", "son", "family"];
  16.  
  17. // DON'T EDIT BELOW
  18. console.log('WORKING');
  19.  
  20. const searchRelatedList = document.querySelectorAll('.searchRelatedList a')
  21. searchRelatedList.forEach(term => {
  22. const searchTerm = term.textContent.toLocaleLowerCase().trim();
  23. wordList.forEach(word => {
  24. if(searchTerm.match(word) && word != "") {
  25. term.parentElement.remove()
  26. console.log(`search suggestion removed => ${searchTerm} cuz it contains ==> ${word}`)
  27. }
  28. })
  29. })
  30.  
  31. const titles = document.querySelectorAll('.videoBox .title a')
  32. titles.forEach(title => {
  33. const titleContent = title.textContent.toLocaleLowerCase().trim();
  34. wordList.forEach(word => {
  35. if(titleContent.match(word) && word != "") {
  36. title.parentElement.parentElement.parentElement.parentElement.remove();
  37. console.log(`video removed => ${titleContent} cuz it contains ==> ${word}`)
  38. }
  39. })
  40. });