Skip to content

Instantly share code, notes, and snippets.

@louy2 louy2/browser.js
Last active Jan 31, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.