mirror of
https://github.com/Anarios/return-youtube-dislike.git
synced 2026-11-06 13:34:48 +01:00
2f2153ed37
* Fix disappearing dislike counter - userscript * Fix rate bar in userscript, disable it by default (it has been broken for ages) * Fix event listeners being thrown away by YouTube in some cases * Fix disappearing dislike count on button focus/unfocus * Remove repetitive code from the userscript * Userscript fix for disappearing dislikes while smartimations play * Check if smartimationContainer exists * Properly handle non-existing dislike button In some cases, dislike button doesn't exist when we're trying to interact with it. For end users, it manifested as dislike counter appearing on both dislike button and share button (because getDislikeButton was falling back to the second child of getButtons()). I don't see an elegant way of fixing this without creating a fake button in DOM specifically for this case or rewriting the whole userscript. Ignoring this would result in errors appearing in console. --------- Co-authored-by: Felix Nguyen <kokonguyen191@gmail.com>