Skip to content

Instantly share code, notes, and snippets.

@ggorlen
Last active August 27, 2020 17:12
Show Gist options
  • Save ggorlen/0d10691747079b042226d056eb444427 to your computer and use it in GitHub Desktop.
Save ggorlen/0d10691747079b042226d056eb444427 to your computer and use it in GitHub Desktop.
skip the 5-second delay between videos on udacity
// ==UserScript==
// @name Udacity Video Delay Skipper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description skip the 5-second delay between videos on udacity
// @author ggorlen
// @match https://classroom.udacity.com/courses*
// @grant none
// ==/UserScript==
(function () {
new MutationObserver(function (mutations) {
for (var i = 0; i < mutations.length; i++) {
for (var j = 0; j < mutations[i].addedNodes.length; j++) {
try {
if (mutations[i].addedNodes[j].className.includes("index--auto-advance-overlay--BKc5y")) {
document.querySelector("._auto-advance-overlay--button--3yFIl").click();
}
}
catch (err) {}
}
}
}).observe(document.documentElement, {childList: true, subtree: true, attributes: true});
})();
<html>
<body>
<!-- bookmarklet installation: open this html file in a browser and bookmark the below link
by clicking and dragging it to the bookmarks bar. click it upon visiting udacity.
-->
<a href="javascript:(function () { new MutationObserver(function (mutations) { for (var i = 0; i < mutations.length; i++) { for (var j = 0; j < mutations[i].addedNodes.length; j++) { try { if (mutations[i].addedNodes[j].className.includes('index--auto-advance-overlay--BKc5y')) { document.querySelector('._auto-advance-overlay--button--3yFIl').click(); } } catch (err) {} } } }).observe(document.documentElement, {childList: true, subtree: true, attributes: true}); })();">udacity skipper</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment