Created
March 3, 2023 17:23
-
-
Save kevinlin1/0e299a00117c17d63f16c357f6232065 to your computer and use it in GitHub Desktop.
Randomly select a Canvas group from the instructor-side page listing all available Canvas groups. Hides the unassigned students sidebar and scrolls the randomly-selected team into view.
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
javascript:(() => { | |
document.querySelector('.unassigned-students').remove(); | |
document.querySelector('.groups').classList.remove('span9'); | |
document.querySelectorAll('[aria-expanded="true"].toggle-group.group-heading').forEach(e => e.click()); | |
const groups = document.getElementsByClassName('toggle-group group-heading'); | |
const randomGroup = groups[Math.floor(Math.random() * groups.length)]; | |
randomGroup.click(); | |
randomGroup.scrollIntoView(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment