Files
return-youtube-dislike/Extensions/UserScript
Moondarker 2f2153ed37 Userscript fix - disappearing dislike counter (#1000)
* 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>
2023-12-12 19:30:17 +01:00
..