Created
July 20, 2026 17:00
-
-
Save phette23/4b1f68bb92e4a1ec70ecd051ecd2fa9d to your computer and use it in GitHub Desktop.
Repeatedly click "restore from archive" button in Panopto folder
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
| // Unarchive all sessions in a folder | |
| // Poll the DOM every second for a floating modal progress indicator, | |
| // then if it's not present click the first "Restore from Archive" button. | |
| // override window confirm so we don't have to click it manually | |
| window.confirm = () => true | |
| const interval = setInterval(() => { | |
| const modal = document.querySelector("#loadingMessage") | |
| if (!modal || modal.style.display === "none") { | |
| const restoreButton = document.querySelector( | |
| "div[role='button'][data-automation-id='restore-from-archive']", | |
| ) | |
| if (restoreButton) { | |
| restoreButton.click() | |
| return console.log("Restore from Archive button clicked") | |
| } else { | |
| console.error( | |
| "No modal but also no restore button...hopefully we're done?", | |
| ) | |
| return clearInterval(interval) | |
| } | |
| } | |
| return console.log("Modal progress is present, waiting...") | |
| }, 1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment