Closed Adib-C closed 2 years ago
Problem is, we don't know if a video is 90% liked and 10% disliked simultaneously
get the likes and dislikes from the actual content that is displayed, https://i.imgur.com/eVXNa7K.png , and then calculate how much percentage is the like
But if like is 90%, it doesn't necessarily mean that the dislike will be 10%
wdym?
10000 people watch the video, 9000 liked, this doesn't mean that the rest disliked.
lets say for example, there is 1k likes and 500 dislikes, we add them together, and then calculate how much percentage is the likes and how much percentage is the dislikes
lets say for example, there is 1k likes and 500 dislikes, we add them together, and then calculate how much percentage is the likes and how much percentage is the dislikes
I will have to get likes of the video using Youtube API causing increase in loading time of extension.
You don't have to, just use the data that is actually displayed on the page
i added the
addBar()
function to show the likes percentage bar -> https://i.imgur.com/nGoT4Vk.pngbut currently, it doesn't show the actual percentage of the likes and dislikes because i don't know how to get the likes percentage.
so you need to get the likes percentage and then run the function with the likes percentage as a parameter, example =
addBar(78)
that code will add a bar with 78% likes and 22% dislikes