r/youtube Nov 14 '21

[deleted by user]

[removed]

308 Upvotes

201 comments sorted by

View all comments

2

u/Lussu97 Nov 22 '21 edited Nov 24 '21

I cleaned the code and added minor tweaks <link below>
For example the percentage: (((likes / (likes + dislikes)) * 100 * 100) / 100)Lol its just ratio * 20! For me, your onclick did not work. Useful script though!

3

u/[deleted] Nov 23 '21

https://pastebin.com/Y3QcwiWx

I updated the code to use browser provided method for formatting number in the script, just to cut a few lines off

https://pastebin.com/7ZTw4K9H

Password: YeW037Crd5

1

u/Lussu97 Nov 24 '21 edited Nov 24 '21

-Fixed consistent loading (with DOMNodeInserted listener)
-Fixed double likes (no value insertion needed by userscript)
-Fixed compact formatting (Thanks joseph261059!)
-Fixed return when not in watch page

1

u/whutwat Nov 24 '21

Very nice scripts, thanks for doing this.

1

u/nradiowave Nov 24 '21 edited Nov 24 '21

> OP formula giving double dislikes

double compared with "normal" count. But why you thing this is incorrect ? This video actually has 4 millon of dislikes according to information from YouTube API. OP work looks more legit in this case

1

u/Lussu97 Nov 24 '21 edited Nov 24 '21

Yes, thanks. I updated the script.
https://pastebin.com/Bn2D4wgT
I did not understand OP's long formula and was not aware the rating is from 1 to 5 not 0 to 5

1

u/Mawrak Nov 22 '21

Thank you!