elliotwaite/thumbnail-rating-bar-for-youtube

Local etension

shhivaam opened this issue · 3 comments

Sir you already given me local extension by changing:
function getRatingPercentageHtml(videoData) {
let r = (1 - videoData.rating) * 1275
let g = videoData.rating * 637.5 - 255
if (!isDarkTheme) {
g = Math.min(g, 255) * 0.85
}
let rgb = 'rgb(' + r + ',' + g + ',0)'

return '' + ratingToPercentage(videoData.rating) + ''
}

to

function getRatingPercentageHtml(videoData) {
let r = (1 - videoData.rating) * 1275
let g = videoData.rating * 637.5 - 255
if (!isDarkTheme) {
g = Math.min(g, 255) * 0.85
}
let rgb = 'rgb(' + r + ',' + g + ',0)'
let text = videoData.likes.toLocaleString() + ' likes, ' + videoData.dislikes.toLocaleString() + ' dislikes'

return '' + text + ''
}

to get number of likes and dislike below the title of the video,can you write a new code to get same because it doesnt load like and dislike data for most videos in video page of youtube channel and when we search anything in youtube under people also watched,top news and for you section,it doesnt load like dislike data and for last video in each category it loads but its wrong count showing and also for youtube shorts video it doesnt load

Thank's for reporting this. I currently don't have time to work on this, but I have added this to my future TODO list to get to eventually.