rebuilding site Fri Sep 2 10:55:54 PM CST 2022

This commit is contained in:
James Feng Cao 2022-09-02 22:55:54 +08:00
parent e1b83a0c77
commit a2ad390c55
2 changed files with 21 additions and 0 deletions

9
redirect.html Normal file
View file

@ -0,0 +1,9 @@
<head>
<script type="text/javascript">
var ls = navigator.languages;
for(var i in ls){
if(ls[i].startsWith("en")) {location.href="en/index.html";break;}
if(ls[i].startsWith("zh")) {location.href="zh/index.html";break;}
}
</script>
</head>

12
redirect.html~ Normal file
View file

@ -0,0 +1,12 @@
<head>
<script type="text/javascript">
var langs = navigator.languages;
var href = location.href;
var i = href.lastIndexOf('/');
var base = href.substring(0,i+1);
for(var l in langs){
if(l.startsWith("en")) {location.href=base+"en/index.html";break;}
if(l.startsWith("zh")) {location.href=base+"zh/index.html";break;}
}
</script>
</head>