Created
July 8, 2020 12:30
-
-
Save AlexCzar/2e55df163bc46541d07a851f9003fcbc to your computer and use it in GitHub Desktop.
Script that automatically admits people to Google Meet meetings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Auto-Admit google meet | |
// @namespace Violentmonkey Scripts | |
// @match https://meet.google.com/ | |
// @grant none | |
// @version 1.0 | |
// @author Alex Czar | |
// @description 27/03/2020, 12:46:14 | |
// ==/UserScript== | |
const clickEvent = new MouseEvent("click", { | |
view: window, | |
bubbles: true, | |
cancelable: true | |
}); | |
const autoAdmit = (mutation) => { | |
if (!mutation.addedNodes) return | |
const element = document.querySelector(".XfpsVe > div:nth-child(2) > span:nth-child(3)"); | |
element && element.dispatchEvent(clickEvent); | |
}; | |
const observer = new MutationObserver((mutations) => mutations.forEach(autoAdmit)); | |
observer.observe( | |
document.body, | |
{ | |
childList: true, | |
subtree: true, | |
attributes: false, | |
characterData: false | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment