Advertisement
Guest User

YV ignore

a guest
Jan 3rd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         YV ignore
  3. // @include      http://www.yksivaihde.net/site/foorumi/*
  4. // @version      0.1
  5. // @description  ignore
  6. // @author       Okw
  7. // @grant        none
  8. // ==/UserScript==
  9.  
  10. (function() {
  11.     'use strict';
  12.  
  13.     // Your code here...
  14.     var turhat_ulisijat = ["Tahmatassu"];
  15.  
  16.     var x = document.getElementsByClassName("threadauthor");
  17.  
  18.     for (var i = 0, alt = false; i < x.length; i++) {
  19.         var li = x[i].parentNode;
  20.         if (turhat_ulisijat.includes(x[i].children[0].children[2].innerHTML.replace(/(<([^>]+)>)/ig,""))) {
  21.             li.style.display = "none";
  22.             continue;
  23.         }
  24.  
  25.         if (alt) {
  26.             li.setAttribute("class", "alt");
  27.         } else {
  28.             li.removeAttribute("class");
  29.         }
  30.         alt = !alt;
  31.     }
  32. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement