Last active
December 9, 2024 01:06
-
-
Save przemoc/d94af3f525caa57a539b6eafb7cbb7ee to your computer and use it in GitHub Desktop.
Bookmarklet for YouTube: Sort videos by length in videos tab
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
javascript:(function(){l=[].map.call(document.querySelectorAll("span.ytd-thumbnail-overlay-time-status-renderer"),function(e){l=e.innerHTML.trim().split(":").map(function(t){return parseInt(t)}).reduce(function(p,c){return p*60+c});return{a:e.parentElement.parentElement.parentElement,l:l}}).sort(function(a,b){return a.l-b.l});i=document.querySelector("#primary #items");l.forEach(function(o){i.appendChild(o.a.parentElement.parentElement.parentElement)})})() |
Basic description is available in my other gist:
Bookmarklet for YouTube: Sort videos by length in videos tab.
How i install and use this ? ( for dummies lol)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested in Firefox (69). Unfortunately in Chrome (76) it triggers reloading list of videos, but I haven't investigated why and how to fix it.