Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Mute All Notes on multiplayer.com

Eliteartziksdee May 21st, 2020 1,126 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.addEventListener('load', () => {
  2.     var btn = document.createElement('div');
  3.     btn.classList.add('ugly-button');
  4.     btn.innerHTML = "Mute All";
  5.     btn.id = "muteAll";
  6.     btn.onclick = function() {
  7.         var i = 0;
  8.         var success= false;
  9.         for(i; i < document.getElementById("names").children.length; i++) {
  10.             if(!document.getElementById("names").children[i].classList.contains("me")) {
  11.                 var event = document.createEvent("MouseEvents");
  12.                 event.initMouseEvent("mousedown", true, true, window);
  13.                 document.getElementById("names").children[i].dispatchEvent(event);
  14.                 if(document.getElementsByClassName("participant-menu")[0].children[1].dispatchEvent(event)) {
  15.                     success = true;
  16.                 }
  17.             }
  18.            
  19.         }
  20.         if(success) {
  21.             if(btn.innerHTML === "Mute All") btn.innerHTML = "Unmute All";
  22.             else  btn.innerHTML = "Mute All";
  23.         }
  24.     }
  25.     document.getElementsByClassName("relative")[0].appendChild(btn);
  26. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top