Last active
July 3, 2024 03:22
-
-
Save willnet/a1def22d1946de09d0d957528eca230c to your computer and use it in GitHub Desktop.
google meet参加者から誰か一人をランダムで選択するスクリプト
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
// chromeを利用して、ユーザ一覧を表示しつつconsoleで↓を実行すると、現在の参加者からランダムで一人表示することができます | |
const names_array = document.querySelector("[aria-label='参加者']").innerText.split("\n").filter((word)=> !word.match(/\(|メイン|ミュート|主催者|あなたの画面共有|その他の操作|keep_off|more_vert|keep|domain_disabled/)) | |
const names_set = new Set(names_array) | |
const names_uniq_array = Array.from(names_set) | |
names_uniq_array[Math.floor(Math.random() * names_uniq_array.length)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment