Skip to content

Instantly share code, notes, and snippets.

@ChlodAlejandro
Last active February 26, 2021 04:56
Show Gist options
  • Save ChlodAlejandro/3840f7685ad27b805da63edf0e894c09 to your computer and use it in GitHub Desktop.
Save ChlodAlejandro/3840f7685ad27b805da63edf0e894c09 to your computer and use it in GitHub Desktop.
Get all Google Meet meeting attendees and given join times
if (window.gm_members == null)
window.gm_members = {};
var check = () => {
const now = Math.floor(Date.now() / 1000);
const curList = [];
document.querySelectorAll(".ZjFb7c").forEach(e => {
if (curList.includes(e.innerText))
return;
curList.push(e.innerText);
if (window.gm_members[e.innerText] == null)
window.gm_members[e.innerText] = { start: now, lastPing: now, pings: [] }
window.gm_members[e.innerText].lastPing = now;
window.gm_members[e.innerText].pings.push(true);
});
for (const member of Object.values(window.gm_members)) {
if (member.lastPing !== now) {
member.lastPing = now;
member.pings.push(false);
}
}
setTimeout(check, 1000);
};
check();
// Export member list as an array
console.log(Object.entries(window.gm_members).map(([k, v]) => {
return v.pings.reduce((p, n) => p || n, true) ? k : null
}).filter(v => v !== null));
// Export data for Meetsack processor
navigator.clipboard.writeText(JSON.stringify(window.gm_members)).then(function() {
alert("copied!");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment