Twitch Sort By Newest/Oldest

Sorts Twitch clips by newest or oldest on the 24-hour clips page.
NOTE
The script is designed to work on the 24-hour clips page. You need to refresh the page to load the button.
Key Features
- Adds a "Sort by Newest/Oldest" button to toggle sorting the clips by newest or oldest with a single click.
- Handles edge cases like "Yesterday" and properly sorts clips based on hours and minutes.
Usage
On Twitch 24-hour clips pages (e.g., https://www.twitch.tv/*/clips?filter=clips&range=24hr
), you will notice the following changes:
- Sort by Newest/Oldest Button: Click this button to toggle sorting the clips on the current page by newest or oldest.
- Sorted Clips: Once the "Sort by Newest/Oldest" button is clicked, the clips will be rearranged with the newest or oldest clips appearing first, based on the current sorting order.
Changelog
- 2023-05-11 (1.0): Initial release.
License
This userscript is released under the GNU GPLv3 license.