Hide Toronto Mike Users

Hide annoying users on Toronto Mike blog. Fucking trolls.

目前为 2014-09-14 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Hide Toronto Mike Users
  3. // @description Hide annoying users on Toronto Mike blog. Fucking trolls.
  4. // @namespace torontomike
  5. // @include http://www.torontomike.com/
  6. // @include http://*.torontomike.com/
  7. // @include http://www.torontomike.com/*
  8. // @include http://*.torontomike.com/*
  9. // @version 1.2
  10. // ==/UserScript==
  11.  
  12.  
  13. var blacklist = ["cheryl", "argie", "Cheryl", "Argie"]; // ["cheryl", "any other name", "seperated by comma"] not case sensitive
  14. var comments = document.getElementsByClassName("comment"); // Get all comments
  15. var i;
  16. var comment;
  17. var user;
  18.  
  19. for(i = 0; i < comments.length; i++)
  20. {
  21. var hide = false;
  22. comment = comments[i];
  23. user = comment.getElementsByTagName("p")[0].getElementsByClassName("bigger")[0].textContent;
  24.  
  25.  
  26. for (blacklist_count = 0; blacklist_count < blacklist.length; blacklist_count++)
  27. {
  28. if (user.toUpperCase().trim() == blacklist[blacklist_count].toUpperCase().trim())
  29. {
  30.  
  31. comment.style.display = "none";
  32. break;
  33. }
  34. }
  35.  
  36. } // End comment loop
  37.  
  38.