// ==UserScript== // @name Zoom automatically raise hand // @name:zh-TW Zoom自動舉手 // @namespace http://tampermonkey.net/ // @version 0.2 // @description By detecting how many others are raising their hand, if exceed the threshold you set, then the program will automatically raise your hands. // @description:zh-TW 檢測有多少人舉手,如果超過閾值,程序將自動舉手 // @author You // @match *://zoom.us/wc/* // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; var bar = document.getElementsByClassName("footer__inner")[0]; var tray = document.createElement("div"); tray.innerHTML = 'Raise hand if hands are raising
The plugin will only work when opening the participant list.'; tray.setAttribute ('id', 'mask'); tray.style.position = "absolute"; tray.style.color = "white"; tray.style.backgroundColor = "rgba(0,0,0,0)"; tray.style.left = "250px"; tray.style.top = "5px"; tray.style.zIndex = "999999"; bar.insertBefore(tray, bar.childNodes[1]); var interval2; var hands; function startHang(){ clearInterval("interval2"); interval2 = setInterval(function(){ var array = document.getElementsByClassName("participants-icon__participants-raisehand"); var handStatus = document.getElementsByClassName("nonverbal-icon raisehand-icon")[0].className; if((hands <= array.length && handStatus.indexOf("selected") == -1)||(hands > array.length && handStatus.indexOf("selected") != -1)){ document.getElementsByClassName("button-without-style")[0].click(); } }, 2000); } document.getElementById("handBtn").onclick = function(){ hands = Number(document.getElementById("hands").value); startHang(); } document.getElementById("stopBtn").onclick = function(){ clearInterval(interval2); } // Your code here... })();