Skip to content

Instantly share code, notes, and snippets.

@nerdCopter
Created March 10, 2021 13:57
Show Gist options
  • Save nerdCopter/ca1c3d7ed5dae67029afbc4c80dc0cd0 to your computer and use it in GitHub Desktop.
Save nerdCopter/ca1c3d7ed5dae67029afbc4c80dc0cd0 to your computer and use it in GitHub Desktop.
Enhancer for Youtube (EfYT) custom script
// plugin (addon) for web browser youtube controls
// https://www.mrfdev.com/enhancer-for-youtube
function sleep(ms) {
console.log('Taking a break...');
var date = new Date();
var curDate = null;
do { curDate = new Date(); }
while(curDate-date < ms);
console.log(ms+'ms later');
}
//old versions
//function hidekeybicon() {
// var a = document.createElement("style");
// a.type = "text/css";
// a.textContent = ".efy-ytp-keyboard-shortcuts{display:none!important}";
// document.head.appendChild(a)
//}
//hidekeybicon ();
// cannot run too quicly, page must load first
sleep(2500);
// perma EfYT icons
//document.documentElement.classList.toggle('efyt-controls-visible');
document.documentElement.classList.toggle('efyt-controls-visible',true);
//hide recommended
document.querySelector('#related').classList.toggle('hidden')
document.querySelector('#items').classList.toggle('hidden')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment