Browse Source

Update Return Youtube Dislike.user.js

evanreichard 3 năm trước cách đây
mục cha
commit
15215558ae
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Extensions/UserScript/Return Youtube Dislike.user.js

+ 1 - 1
Extensions/UserScript/Return Youtube Dislike.user.js

@@ -358,7 +358,7 @@ function numberFormat(numberState) {
     ?.find((n) => n?.getAttribute("href")?.includes("?locale="))
     ?.getAttribute("href");
   
-  const userLocales = localeURL ? new URL(localeURL)?.searchParams?.get("locale") : null;
+  const userLocales = localeURL ? new URL(localeURL)?.searchParams?.get("locale") : document.body.lang;
 
   const formatter = Intl.NumberFormat(
     document.documentElement.lang || userLocales || navigator.language,