-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpanopto.js
More file actions
20 lines (20 loc) · 911 Bytes
/
panopto.js
File metadata and controls
20 lines (20 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// ==UserScript==
// @name Panopto AUTO RESTORE BOT
// @namespace https://libraries.cca.edu
// @version 1.0.0
// @description automatically click "Restore from archive" button in Panopto
// @author @phette23
// @match https://ccarts.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=*
// @grant none
// @updateURL https://raw.githubusercontent.com/cca/libraries_tampermonkey/main/panopto.js
// @downloadURL https://raw.githubusercontent.com/cca/libraries_tampermonkey/main/panopto.js
// ==/UserScript==
// doc DOMContentLoaded & load events don't seem to fire so we use a timeout
console.log("Panopto tampermonkey script running")
setTimeout(() => {
const btn = document.querySelector('#viewerArchivedPage button')
if (btn && btn.textContent.includes("unarchive")) {
console.log('Clicking "Restore from Archive" button')
btn.click()
}
}, 1000)