mirror of
https://github.com/MisskeyIO/misskey
synced 2024-11-28 06:48:32 +09:00
[Client] Fix bug
This commit is contained in:
parent
7be48285e2
commit
0bab5ce27d
@ -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 New Issue
Block a user