mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
rebuilding site Fri Sep 2 10:55:54 PM CST 2022
This commit is contained in:
parent
e1b83a0c77
commit
a2ad390c55
2 changed files with 21 additions and 0 deletions
9
redirect.html
Normal file
9
redirect.html
Normal 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
12
redirect.html~
Normal 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>
|
Loading…
Reference in a new issue