-
-
Save jelizaga3-gatech/15ddf81af264018c3fd2a92b478cc624 to your computer and use it in GitHub Desktop.
skip the 5-second delay between videos on udacity
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
(function () { | |
// click through the 5-second delay between udacity videos | |
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 { } | |
} | |
} | |
}).observe(document.documentElement, { childList: true, subtree: true, attributes: true }); | |
// Hide sidebar on 'Next' | |
new MutationObserver( (mutations) => { | |
mutations.forEach(mutation => { | |
let foo = mutation.target.getAttribute("class") | |
if (foo != null && foo.includes("_layout-module--nav--3qaiq _layout-module--secondary-only--33dGC") && !foo.includes("_layout-module--hidden--2IaXy")) { | |
document.getElementsByClassName('hamburger--hamburger-link--3-KRS')[0].click() | |
} | |
}); | |
}).observe(document.documentElement, { childList: true, subtree: true, attributes: true }); | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment