Skip to content

Instantly share code, notes, and snippets.

@louy2
Last active January 31, 2019 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save louy2/17c80911e198de8fde5b707cb4314fd9 to your computer and use it in GitHub Desktop.
Save louy2/17c80911e198de8fde5b707cb4314fd9 to your computer and use it in GitHub Desktop.
Dismiss all course updates in My Blackboard
/* 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