Extract language from html instead of browser UI

This commit is contained in:
Pavel Moiseenko authored and GitHub committed 2021-12-05 21:50:47 +03:00
1 parent 8eed2febfe
commit 4b04d161ec
1 file changed
+2 -2
@@ -289,7 +289,7 @@ function roundDown(num) {
}
function numberFormat(numberState) {
const userLocales = navigator.language;
const userLocales = document.documentElement.lang;
const formatter = Intl.NumberFormat(userLocales, {
notation: "compact",
@@ -369,4 +369,4 @@ if (isMobile) {
setInterval(() => {
getDislikeButton().querySelector(".button-renderer-text").innerText = mobileDislikes;
}, 1000);
}
}