Created
March 10, 2021 13:57
-
-
Save nerdCopter/ca1c3d7ed5dae67029afbc4c80dc0cd0 to your computer and use it in GitHub Desktop.
Enhancer for Youtube (EfYT) custom script
This file contains hidden or 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
// 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