Anarios / return-youtube-dislike

Chrome extension to return youtube dislikes
https://returnyoutubedislike.com/
GNU General Public License v3.0
12.69k stars 568 forks source link

false number showing in likes/dislikes when 'reformat like numbers' option is on #898

Open spidy2356 opened 1 year ago

spidy2356 commented 1 year ago

Have you tried to find similar open issues?

Browser

Google chrome,

Browser Version

Version 112.0.5615.50 (Official Build) (64-bit)

Extension or Userscript?

Extension

Extension/Userscript Version

v3.0.0.8

Video link where you see the problem

most of the videos which have more than like no. 1k.

What happened?

when "reformat like numbers" option is on then most of the videos like no. change like 60k to 60L and dislike button change like 23 to 23T or something like that

How to reproduce/recreate?

this problem only occur is the 'reformat like numbers' option is enabled Screenshot 2023-04-09 221628

Will you be available for follow-up questions to help developers diagnose & fix the issue?

Yes

officiallor commented 1 year ago

I found the problem. It is related to formatterNotation in NumberFormat for "en-IN" locale. I looked about it and it seems that it might be a correct representation like this guy on stackoverflow says "here"

Example code:

const number = 34000;

const locale = "en-IN"; //change to "en", "al-SQ" etc
const formatterNotation = "compact"; //change to "standard", "compact" causes the trouble
const formatterCompactDisplay = "short"; //change to "long"

console.log(new Intl.NumberFormat(locale, {
    notation: formatterNotation,
    compactDisplay: formatterCompactDisplay,
  }).format(number));
spidy2356 commented 1 year ago

@officiallor I'm not a developer and don't have a little bit of knowledge about coding.....so you fix it......I just help you by testing

ccuser44 commented 1 year ago

The extension should be set to format the numbers in the computer locale instead of a static locale

spidy2356 commented 1 year ago

The extension should be set to format the numbers in the computer locale instead of a static locale

@officiallor @ccuser44 how to do that?... Give me guidance cause the problem didn't solve yet. I test it now

ccuser44 commented 1 year ago

The extension should be set to format the numbers in the computer locale instead of a static locale

@officiallor @ccuser44 how to do that?... Give me guidance cause the problem didn't solve yet. I test it

No I just meant that the dev of this extension should do that.