Forked from RoryDuncan/kick-all-from-google-meet.js
Created
September 4, 2024 06:56
-
-
Save ludndev/cd2c62002da5727877c39728b9c01d50 to your computer and use it in GitHub Desktop.
Script for kicking all users from a google meet call
This file contains hidden or 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
(() => { | |
let thenKickSelf = window.confirm("Kick yourself too?"); | |
const wait = (ms) => new Promise(resolve => window.setTimeout(resolve, ms)); | |
const click = (el) => (el.click(), wait(260)); | |
const confirm = () => click(document.querySelector(`[data-id="EBS5u"]`)); | |
const buttons = Array.from(document.querySelectorAll(`[data-tooltip="Remove from meeting"]`)); | |
const kickSelf = () => document.querySelector(`[data-tooltip="Leave call"]`).click(); | |
let init = wait(0); | |
buttons.reduce((chain, el) => { | |
return chain | |
.then(() => click(el)) | |
.then(() => confirm()) | |
.then(() => wait(50)) | |
}, init).then(() => (console.log("Done."), thenKickSelf ? kickSelf() : undefined)); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment