-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
28 lines (28 loc) · 1.03 KB
/
index.html
File metadata and controls
28 lines (28 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wizard's Forge</title>
<script>
(function () {
var pref = null;
document.cookie.split(';').forEach(function (pair) {
var parts = pair.trim().split('=');
if (parts[0] === 'lang') { pref = parts[1]; }
});
if (pref === 'en') { window.location.replace('/en/'); return; }
if (pref === 'ja') { window.location.replace('/ja/'); return; }
var lang = (navigator.language || navigator.userLanguage || '').toLowerCase();
var tz = '';
try { tz = Intl.DateTimeFormat().resolvedOptions().timeZone; } catch (e) {}
if (lang === 'ja' || lang.indexOf('ja-') === 0 || tz === 'Asia/Tokyo') {
window.location.replace('/ja/');
} else {
window.location.replace('/en/');
}
})();
</script>
</head>
<body></body>
</html>