Last active
January 31, 2019 16:17
-
-
Save louy2/17c80911e198de8fde5b707cb4314fd9 to your computer and use it in GitHub Desktop.
Dismiss all course updates in My Blackboard
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
/* Dismiss all course updates in My Blackboard | |
* | |
* To use this, copy the following script into the developer console while on the Updates page | |
*/ | |
// iframeRef takes an iframe element and returns the document inside it | |
// Ref: https://stackoverflow.com/questions/1452871/how-can-i-access-iframe-elements-with-javascript | |
const iframeRef = fr => fr.contentWindow ? fr.contentWindow.document : fr.contentDocument; | |
// get the Blackboard main UI iframe document | |
const bb = iframeRef(document.querySelector('#mybbCanvas')); | |
// click every dismiss button | |
Array.from(bb.querySelectorAll('.browse')).filter(e => e.id.startsWith('dismiss')).forEach(e => e.click()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment