Last active
November 14, 2024 10:37
-
-
Save tolzhabayev/8865374f7aa328f2a0d9ab16ffa37b18 to your computer and use it in GitHub Desktop.
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
| const participants = new Set( | |
| Array.from(document | |
| .querySelectorAll('span.notranslate:not([class*=" "])')) | |
| .map(item => item.textContent) | |
| ); | |
| const shuffledParticipants = new Set( | |
| Array.from(participants) | |
| .sort(() => Math.random() - 0.5) // Randomly sort the array | |
| ); | |
| setTimeout(() => { | |
| const textArea = document.querySelector('textarea'); | |
| const send = document.querySelector('button[aria-label~="Send"]'); | |
| if (textArea && send) { | |
| textArea.value = "Daily order:\n-----------------\n" + Array.from(shuffledParticipants).join('\n'); | |
| send.removeAttribute('disabled'); | |
| send.removeAttribute('aria-disabled'); | |
| send.click(); | |
| } | |
| }, 300); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add it via https://chriszarate.github.io/bookmarkleter/