diff options
author | Dmitrii Selivanov <selivano.d@gmail.com> | 2021-11-29 10:43:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 10:43:27 +0300 |
commit | f44f22eaae083d5294fed4b3158eac75fb1c21a6 (patch) | |
tree | a318fa7f5420e4295733b23aa2d2b73192ddfd90 | |
parent | 5918a26d22695f8681fa7a820b0d7ff247b6d13f (diff) | |
parent | 77ce8f6a063c91ef458d5d37077ec61db3997beb (diff) |
Merge pull request #81 from j14-c/main
Fixed numberFormat RegEx
-rw-r--r-- | Extensions/UserScript/Return Youtube Dislike.user.js | 2 | ||||
-rw-r--r-- | Extensions/chrome/return-youtube-dislike.script.js | 2 | ||||
-rw-r--r-- | Extensions/firefox/return-youtube-dislike.script.js | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Extensions/UserScript/Return Youtube Dislike.user.js b/Extensions/UserScript/Return Youtube Dislike.user.js index 139dedd..d41f36e 100644 --- a/Extensions/UserScript/Return Youtube Dislike.user.js +++ b/Extensions/UserScript/Return Youtube Dislike.user.js @@ -209,7 +209,7 @@ function numberFormat(numberState) { maximumFractionDigits: 1 }); - return formatter.format(roundDown(numberState)).replace(/.0|,0/gi, ''); + return formatter.format(roundDown(numberState)).replace(/\.0|,0/, ''); } function setEventListeners(evt) { diff --git a/Extensions/chrome/return-youtube-dislike.script.js b/Extensions/chrome/return-youtube-dislike.script.js index 9a1fb94..d51cc00 100644 --- a/Extensions/chrome/return-youtube-dislike.script.js +++ b/Extensions/chrome/return-youtube-dislike.script.js @@ -154,7 +154,7 @@ maximumFractionDigits: 1 }); - return formatter.format(roundDown(numberState)).replace(/.0|,0/gi, ''); + return formatter.format(roundDown(numberState)).replace(/\.0|,0/, ''); } var jsInitChecktimer = null; diff --git a/Extensions/firefox/return-youtube-dislike.script.js b/Extensions/firefox/return-youtube-dislike.script.js index 8c0e176..293388b 100644 --- a/Extensions/firefox/return-youtube-dislike.script.js +++ b/Extensions/firefox/return-youtube-dislike.script.js @@ -150,7 +150,7 @@ function numberFormat(numberState) { maximumFractionDigits: 1 }); - return formatter.format(roundDown(numberState)).replace(/.0|,0/gi, ''); + return formatter.format(roundDown(numberState)).replace(/\.0|,0/, ''); } function setEventListeners(evt) { |