Advertisement
Guest User

Ignore User v 0.1

a guest
Jan 7th, 2022
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Ignore Lowetide User Script v 0.1
  2. // ------------------------------------
  3.  
  4. // Insert username of person you want to ignore in the line below.
  5. // Simply replace the name 'Add username here'
  6. // or add another using "" separated by a comma.
  7. const userNames = ["Harpers Hair", "Add Username Here"];
  8.  
  9.  
  10. // Nothing needs to be edited below this line ***************************************
  11.  
  12. let userComments = document.getElementsByClassName("wpd-comment-author");
  13.  
  14. for (var i = 0; i < userComments.length; i++) {
  15.     let userName = userComments[i].textContent.trim();
  16.     let blockTarget = userComments[i].parentNode.parentNode.parentNode.parentNode;
  17.     if (userNames.includes(userName)) {
  18.         blockTarget.style.display = "none";
  19.     }
  20.  
  21. let repliesToUser = document.getElementsByClassName("wpd-reply-to");
  22.  
  23. for (var x = 0; x < repliesToUser.length; x++) {
  24.     let targetUser = repliesToUser[x].children[1].innerText.trim();
  25.     if (userNames.includes(targetUser)) {
  26.         repliesToUser[x].parentNode.parentNode.parentNode.parentNode.parentNode.style.display = "none";
  27.     }
  28.  
  29.  
  30.     }
  31. }
  32.  
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement