fix redirect issues in 4.x

This commit is contained in:
OttoMao 2017-04-05 16:21:01 +08:00
parent 60d079fc39
commit 1088d010f9

View File

@ -15,7 +15,7 @@
<script> <script>
//redirect to Chinese version if in China //redirect to Chinese version if in China
if (new Date().getTimezoneOffset() == "-480" && !(/(cn|en)/i.test(location.href))) { if (new Date().getTimezoneOffset() == "-480" && !(/(cn|en)/i.test(location.href))) {
location.href = "/cn"; location.href = "./cn.html";
} else { } else {
var _hmt = _hmt || []; (function () { var hm = document.createElement("script"); hm.src = "//hm.baidu.com/hm.js?4e51565b7d471fd6623c163a8fd79e07"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); var _hmt = _hmt || []; (function () { var hm = document.createElement("script"); hm.src = "//hm.baidu.com/hm.js?4e51565b7d471fd6623c163a8fd79e07"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();
} }