Block TrackBot

Hides all posts from LetsRun.com's TrackBot

  1. // ==UserScript==
  2. // @name Block TrackBot
  3. // @namespace http://www.letsrun.com
  4. // @description Hides all posts from LetsRun.com's TrackBot
  5. // @include *
  6. // @version 1.1
  7. // ==/UserScript==
  8.  
  9. var authors = document.getElementsByClassName('author');
  10.  
  11. if (authors.length > 0) {
  12. for (i = 0; i < authors.length; i++) {
  13. reg = authors[i].getElementsByTagName('strong')
  14. if (reg.length > 0) {
  15. regname = reg[0].innerHTML;
  16. if (regname == 'TrackBot') {
  17. child = authors[i].parentElement.parentElement;
  18. child.parentElement.removeChild(child);
  19. }
  20. }
  21. }
  22. }