Closed shhivaam closed 1 year ago
Thanks for the feature request! I just updated the code to support Shorts. I've submitted the updated version (v1.8.15) to the browser extension stores. It's already available for Firefox and should be available for Chrome within 24 hrs and on Edge within a week (they have a slow review process).
I've only tested it out a little bit, so let me know if you notice any places where Shorts still aren't getting rating bars added to them.
Please create a local extension changing again for me like you did changing for me earlier by making the like dislike count below the thumbnail of the video.After updating this code for shorts content-script.js is somewhat changed. Earlier code you did change for me was:
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) + '' }
was changed 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 + '' }
On Mon, Nov 13, 2023 at 2:28 PM Elliot Waite @.***> wrote:
Thanks for the feature request! I just updated the code to support Shorts. I've submitted the updated version (v1.8.15) to the browser extension stores. It's already available for Firefox and should be available for Chrome within 24 hrs and on Edge within a week (they have a slow review process).
I've only tested it out a little bit, so let me know if you notice any places where Shorts still aren't getting rating bars added to them.
— Reply to this email directly, view it on GitHub https://github.com/elliotwaite/thumbnail-rating-bar-for-youtube/issues/86#issuecomment-1807707994, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXDKUGD4CPH7LA6L2OJ3W5DYEHOK3AVCNFSM6AAAAAA7IEC6OCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXG4YDOOJZGQ . You are receiving this because you authored the thread.Message ID: @.*** com>
You should be able to apply the same changes here: https://github.com/elliotwaite/thumbnail-rating-bar-for-youtube/blob/master/extension/content-script.js#L192
Oh thank you it`s working, actually the changed function was this:
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 '
' }Thank you so much for adding thumbnail rating for Shorts video as well
On Tue, Nov 14, 2023 at 11:19 PM Elliot Waite @.***> wrote:
You should be able to apply the same changes here:
— Reply to this email directly, view it on GitHub https://github.com/elliotwaite/thumbnail-rating-bar-for-youtube/issues/86#issuecomment-1810811770, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXDKUGFKT63HER6BX7TGP73YEOVLRAVCNFSM6AAAAAA7IEC6OCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJQHAYTCNZXGA . You are receiving this because you authored the thread.Message ID: @.*** com>
Ah, okay, got it.
No problem. Thanks for the suggestion.
I think after adding thumbnail rating for shorts video loading of the thumbnail rating bar has become slow
This could be true. The only difference between the previous version and the current version should be the additional requests made to the API for the Shorts' ratings. This would make it more likely that you hit the API's rate limit sooner, however, I would think that this would not be very noticeable.
It think it's somewhat noticable and personally annoying for me because I've to wait for bit long to load,please you check before updating for shorts and after updating for shorts,it's noticable to you or not or you can have suggestion from the users. If possible can you provide me before updating for shorts,ZIP folder,I want to use that only or previous content-sctipt.js file text
On Wed, Nov 15, 2023, 8:28 PM Elliot Waite @.***> wrote:
This could be true. The only difference between the previous version and the current version should be the additional requests made to the API for the Shorts' ratings. This would make it more likely that you hit the API's rate limit sooner, however, I would think that this would not be very noticeable.
— Reply to this email directly, view it on GitHub https://github.com/elliotwaite/thumbnail-rating-bar-for-youtube/issues/86#issuecomment-1812694819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXDKUGEYRYGX3TNYYYMHVXLYETKCVAVCNFSM6AAAAAA7IEC6OCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJSGY4TIOBRHE . You are receiving this because you authored the thread.Message ID: @.*** com>
It does seem to be slower. Maybe I can make it so it delays adding ratings for shorts so that it prioritizes non-shorts first.
To download any old version of the repo:
Thank you,done it
On Mon, Nov 20, 2023 at 2:11 AM Elliot Waite @.***> wrote:
It does seem to be slower. Maybe I can make it so it delays adding ratings for shorts so that it prioritizes non-shorts first.
To download any old version of the repo:
- Go to the repo's Code section https://github.com/elliotwaite/thumbnail-rating-bar-for-youtube.
- Click the "commits" link near the top right of the file browser viewer.
- For whichever commit you want to view, click the "< >" button at the right side of that commit to view the repo after that commit.
- Click the green "< > Code" button and choose "Download ZIP".
- You can then extract the contents of that Zip file and load the contained "extension" directory as an unpacked extension.
— Reply to this email directly, view it on GitHub https://github.com/elliotwaite/thumbnail-rating-bar-for-youtube/issues/86#issuecomment-1817971356, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXDKUGCLMHQYUSWC7VXK6I3YFJVGRAVCNFSM6AAAAAA7IEC6OCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXHE3TCMZVGY . You are receiving this because you authored the thread.Message ID: @.*** com>
Can you fetch thumbnail rating for Youtube shorts video as well?