Block TrackBot

Hides all posts from LetsRun.com's TrackBot

目前为 2016-10-12 提交的版本。查看 最新版本

  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.0
  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. authors[i].parentElement.parentElement.style.visibility = 'hidden';
  18. }
  19. }
  20. }
  21. }