File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828< noscript > < iframe src ="https://www.googletagmanager.com/ns.html?id=GTM-P8BQTWL "
2929height ="0 " width ="0 " style ="display:none;visibility:hidden "> </ iframe > </ noscript >
3030<!-- End Google Tag Manager (noscript) -->
31- < script >
32- var lang = navigator . language || navigator . userLanguage ; if ( lang . substr ( 0 , 2 ) == "en" ) location = "https://dir.yuuta.moe/en/" ;
33- else if ( lang . substr ( 0 , 2 ) == "zh" ) location = "https://dir.yuuta.moe/zh/" ;
34- </ script >
31+ < script type ="text/javascript ">
32+ var type = navigator . appName ;
33+ if ( type == "Netscape" ) {
34+ var lang = navigator . language ; //获取浏览器配置语言,支持非IE浏览器
35+ } else {
36+ var lang = navigator . userLanguage ; //获取浏览器配置语言,支持IE5+ == navigator.systemLanguage
37+ } ;
38+ var lang = lang . substr ( 0 , 2 ) ; //获取浏览器配置语言前两位
39+ if ( lang == "zh" ) {
40+ window . location . replace ( 'https://dir.yuuta.moe/zh/' ) ; //中文编码时打开链接
41+ } else if ( lang == "en" ) {
42+ window . location . replace ( 'https://dir.yuuta.moe/en/' ) ;
43+ } else { //其他语言编码时打开以下链接
44+ window . location . replace ( 'https://dir.yuuta.moe/en/' ) ;
45+ } ;
46+ </ script >
3547
3648</ body >
3749
You can’t perform that action at this time.
0 commit comments