Don't like ads? PRO users don't see any ads ;-)
Guest

topic keyword ignorator

By: a guest on Aug 19th, 2012  |  syntax: None  |  size: 1.26 KB  |  hits: 40  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // ==UserScript==
  2. // @name Topic Ignorator
  3. // @description Lets you make topics GTFO your endoftheinter.net
  4. // @author cheezit
  5. // @include http://endoftheinter.net/*
  6. // @include https://endoftheinter.net/*
  7. // @include http://boards.endoftheinter.net/*
  8. // @include https://boards.endoftheinter.net/*
  9. // ==/UserScript==
  10.  
  11. var words=new Array();
  12. //Add things to block below the line, using the following format:
  13. //words.push(block);
  14. //For example, if you wanted to ignore SSBB topics, you would add the following line (without the slashes):
  15. //words.push("SSBB");
  16. //For multiple words, use multiple lines.
  17. //The blocked words are not case sensitive.
  18. //Add them below this line
  19.  
  20. //Add blocked words above this line ^^
  21.  
  22. var trs=document.getElementsByTagName("tr");
  23.        
  24.         for (var i=0; i<trs.length; i++)
  25.         {
  26.  
  27.         var tds=trs[i].getElementsByTagName("td");
  28.         if (tds.length>0)
  29.         {
  30.                        
  31.                 var as=tds[0].getElementsByTagName("a");
  32.                 var n;
  33.                 if(as.length == 1)
  34.                 {
  35.                         n = 0;
  36.                 }
  37.                 else
  38.                 {
  39.                         n = 2
  40.                 }
  41.                 var topic = as[n].innerHTML.toLowerCase();
  42.                 for (var j=0; j<words.length; j++)
  43.                 {
  44.                         if (topic.search(words[j].toLowerCase()) != -1 && topic.search("board list") == -1)
  45.                         {
  46.                                 trs[i].parentNode.removeChild(trs[i]);
  47.                                 i--;
  48.                                 break;
  49.                         }
  50.                 }
  51.         }
  52. }