mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-26 11:03:01 +00:00
[Client] Fix bug
This commit is contained in:
parent
7be48285e2
commit
0bab5ce27d
1 changed files with 2 additions and 2 deletions
|
@ -5,8 +5,8 @@
|
|||
const head = document.getElementsByTagName('head')[0];
|
||||
|
||||
// Detect user language
|
||||
let lang = (navigator.languages && navigator.languages[0]) || navigator.language;
|
||||
if (!/en|en\-US|ja/.test(lang)) lang = 'en';
|
||||
let lang = ((navigator.languages && navigator.languages[0]) || navigator.language).split('-')[0].toLowerCase();
|
||||
if (!/^(en|ja)$/.test(lang)) lang = 'en';
|
||||
|
||||
// Detect user agent
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
|
|
Loading…
Reference in a new issue