Youtube Watch Later Sort by Duration
Youtube Watch Later playlist has always lacked a sort-by-duration function. Without external access, services like YTPlaylistSorter from CarterRJ don't work either, thus introducing this code, now migrated to work on TamperMonkey/GreaseMonkey/ViolentMonkey.
The original code was gratefully contributed by SunnyWiz, but it was broken when it got to me. I just fixed it and added some features to make it easier to use.
As of v2, the code has gone through a significant rewrite to increase maintainability and bring it up to modern standards.
After adding this script, additional UI will be appended as shown below.
Changelog 31/12/2022:
- Code refactoring
- Update all comments to fit JSDocs standard
- Moved variables around
- Migrate fireMouseEvent to new Event() syntax
- Added user-friendly log to show the progress of the sorting
- Added feature to sort in descending order
- Added feature to sort only loaded videos
- Added a button to stop sorting (may need to spam the button to stop)
- Added adjustable wait time after drag
You can find the code to this script here, and submitting feedback at the Github Gist will lead to faster responses.