Created
August 13, 2022 03:10
-
-
Save sysnucleus/a020ba1f89d489d1f045f36866e9cbf8 to your computer and use it in GitHub Desktop.
webharvy youtube
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
// Code to scroll listings | |
els = document.getElementsByTagName('ytd-video-renderer'); | |
els[els.length-1].scrollIntoView(); | |
// Code to collate listings | |
els = document.getElementsByTagName('ytd-video-renderer'); | |
parent = els[0].parentElement; | |
for (var i = els.length - 1; i >= 0; i--) { | |
if(els[i].parentElement !== parent) { | |
parent.appendChild(els[i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment