I coded a userscript to restore the dislike counter on YouTube

So, regarding the new update that hides dislike counts from YouTube, I created a Tampermonkey userscript that brings that back, as well as the sentiment bar (the bar below the buttons).

Here is the userscript (paste into Tampermonkey, save the script, and enable it: https://textbin.net/8iyxfntpaa

NOTE: The script DOES NOT work anymore. The script never relied on dislike counts being reported in API, and instead used star ratings hidden in player API and calculated dislikes from there. It was designed to outlive dislike counts themselves being removed from API. However, YouTube pledged to remove dislike counts from API on December 13. I was sure that they wouldn't remove star ratings as well, as it seemed that they completely forgot about it, but it turns out they did. RIP dislike button.

For almost every single video I tested the script on, the estimated dislike count is 100% accurate. There are only some videos with tons of dislikes that the count isn't 100% accurate, but even in those cases, it's 99% accurate.

Here are some examples:

Video: https://www.youtube.com/watch?v=iOztnsBPrAA

Actual dislike count:

https://preview.redd.it/3b5mt3v3dmz71.png?width=195&format=png&auto=webp&s=ba2a5a402376b0697abec3a5696432075c959731

Calculated dislike count with script:

https://preview.redd.it/4acfjnd5dmz71.png?width=232&format=png&auto=webp&s=637268736ebab735089118bfe3d159537c28c317

Video: https://www.youtube.com/watch?v=tollGa3S0o8 (I only picked this because this video is currently #1 on trending as of writing this post)

Calculated dislike count with script:

https://preview.redd.it/fvy15seqdmz71.png?width=232&format=png&auto=webp&s=169651994a6af7cfa1179ca9ce9425ea2bd02f3c

Actual dislike count:

https://preview.redd.it/8cqkby3sdmz71.png?width=198&format=png&auto=webp&s=19a8930500be30324beb5aee10122c276cfdcce0

Heck, even on YouTube Rewind 2018, the dislike count is only 3 dislikes off.

Calculated dislike count with script:

https://preview.redd.it/ies7ya30emz71.png?width=256&format=png&auto=webp&s=d824899a8a2fe76f29c5bd8e8427526438521e8a

Actual dislike count:

https://preview.redd.it/qyrk6gr1emz71.png?width=171&format=png&auto=webp&s=75aad81f0a5d12201ddd5a15c4dafc931b91af9a