youtube
youtube copied to clipboard
fix: reverse playlist persists across video navigation (fixes #3759, #3818, #3883)
(running playlistReverseUpdate() twice with 1.5s delay)
Fix for #3759, #3818, #3883 — Reverse playlist reverts on video navigation
Solution
Add a delayed retry (1.5s) in playlistReverse(). After the initial playlistReverseUpdate() call, a setTimeout fires once more to catch the case where the first attempt returned early because playlist data wasn't ready.
This is minimal and safe:
- Only retries when
playlistReversedis stilltrue - Does not add an interval or loop — just one additional attempt
- The existing
isCurrentlyReversed === shouldBeReversedguard inplaylistReverseUpdate()prevents double-reversing if the first call succeeded
Changes
| File | Change |
|---|---|
playlist.js |
Added 1.5s delayed retry of playlistReverseUpdate() in playlistReverse() |
Testing
- 66/69 unit tests pass (3 pre-existing failures unrelated to this change)
- JS-only change, no CSS or HTML modifications
hi! @suryaprakash0010 #3766
Try the latest release first? #3643 should've already fixed this