Skip to content

Commit

Permalink
如果search信息不全,当做没有search信息处理
Browse files Browse the repository at this point in the history
  • Loading branch information
KylinLove committed Dec 13, 2018
1 parent 02f0d41 commit 5263722
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
LAYA_DEMO
</title>
<script type="text/javascript">
if (!location.search) {
let search = location.search;
let isSearchLegal = search.includes("language") && search.includes("category") && search.includes("group") && search.includes("name");
if (!isSearchLegal) {
var isChinese = navigator.language.indexOf('zh') !== -1;
if(!isChinese)
location.search = "language=en&category=2d&group=Sprite&name=DisplayImage";
Expand Down

0 comments on commit 5263722

Please sign in to comment.