Advertisement
Guest User

Untitled

a guest
Jun 8th, 2021
40
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        add filter hlgg button to vt archive page
  3. // @namespace   Violentmonkey Scripts
  4. // @match       https://boards.4channel.org/vt/archive
  5. // @grant       none
  6. // @version     0.2
  7. // @author      -
  8. // @description 6/8/2021, 6:39:48 PM
  9. // ==/UserScript==
  10. document.getElementsByClassName('navLinks desktop')[0].insertAdjacentHTML('beforeend', ' [<a id="filterhlgg" href="#filterhlgg">Filter /hlgg/</a>]')
  11. document.getElementById('filterhlgg').addEventListener("click", filterHLGG, false);
  12. function filterHLGG(){
  13.   x = document.getElementById('arc-list')
  14.   for (var i = x.tBodies[0].rows.length; i > 0; i--){
  15.     str = x.tBodies[0].rows[i -1].cells[1].textContent
  16.     if(str.toLowerCase().includes('hololive global')){
  17.       //console.log(str);
  18.     }
  19.     else{
  20.       x.tBodies[0].deleteRow(i-1);
  21.     }
  22.   }
  23. }
  24.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement