Просмотр исходного кода

Locales separating decimals with commas

Added regex for locales separating decimals with commas, not periods
Francesco Ferraro 3 лет назад
Родитель
Сommit
2852449aa9
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Extensions/firefox/return-youtube-dislike.script.js

+ 1 - 1
Extensions/firefox/return-youtube-dislike.script.js

@@ -150,7 +150,7 @@ function numberFormat(numberState) {
     maximumFractionDigits: 1
   });
 
-  return formatter.format(roundDown(numberState)).replace('.0', '');
+  return formatter.format(roundDown(numberState)).replace(/.0|,0/gi, '');
 }
 
 function setEventListeners(evt) {