Advertisement
erinx

luka filter

Nov 25th, 2014
1,120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Luka Filter
  3. // @namespace   erin
  4. // @description install, thank, donate
  5. // @include     *8ch.net/*
  6. // @version     0.1
  7. // @run-at      document-body
  8. // @grant       none
  9. // ==/UserScript==
  10.  
  11. function filterLuka(){
  12.  
  13.   function runPosts(){
  14.     var $posts = document.querySelectorAll('.reply');  
  15.     for(var i = 0; i < $posts.length; i++){
  16.       var n = $posts[i].querySelector('.name').innerHTML;
  17.       if(n.indexOf('Theseius') > -1){
  18.         $posts[i].style.display = 'none';
  19.       }
  20.     }
  21.   }
  22.  
  23.   document.addEventListener('8chan-Z.NewPosts', function(){ runPosts(); }, false);
  24.   document.addEventListener('threadUpdate', function(){ runPosts(); }, false);
  25.   document.addEventListener('new_post', function(){ runPosts(); }, false);
  26.  
  27.   setTimeout(function(){runPosts();}, 3000);
  28.  
  29. }
  30. filterLuka();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement