Skip to content

Instantly share code, notes, and snippets.

@Programator2
Created September 30, 2020 10:40
Show Gist options
  • Save Programator2/cc822a521ce49dfdde5074594b4195d4 to your computer and use it in GitHub Desktop.
Save Programator2/cc822a521ce49dfdde5074594b4195d4 to your computer and use it in GitHub Desktop.
Script for getting a list of people attenting Google Meet virtual conference
// Very dirty script. But much better for me than some non-working addons.
// After pasting it into a file I run it through > sort | uniq > attendance.txt
function isElementAtBottom(element) {
return Math.abs(element.scrollHeight - element.scrollTop - element.clientHeight) < 10;
}
people = "";
pane = document.getElementsByClassName("HALYaf tmIkuc s2gQvd KKjvXb")[0];
if (pane.length == 0) {
console.log("Error: Open tab People!");
}
pane.scroll(0, 0);
await new Promise(r => setTimeout(r, 2000));
while (true) {
names = document.getElementsByClassName("cS7aqe");
for (let n of names) {
people += n.innerHTML + "\n";
}
if (isElementAtBottom(pane))
break;
pane.scrollBy(0, pane.clientHeight)
console.log("Scrolling the pane");
await new Promise(r => setTimeout(r, 3000));
}
console.log("Finished")
copy(people);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment