Browse files

change js judge

  • Loading branch information...
1 parent fd42d6e commit 3601046d2f8aed7dc3830b08364ea7e0b945a4ab ShiChunhua committed Mar 20, 2013
Showing with 15 additions and 15 deletions.
  1. +15 −15 index.html
View
30 index.html
@@ -1,9 +1,23 @@
-<!-- saved from url=(0013)about:internet -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> ^__^ </title>
+<script type="text/javascript">
+var sUserAgent= navigator.userAgent.toLowerCase();
+var bIsIpad= sUserAgent.match(/ipad/i) == "ipad";
+var bIsIphoneOs= sUserAgent.match(/iphone os/i) == "iphone os";
+var bIsMidp= sUserAgent.match(/midp/i) == "midp";
+var bIsUc7= sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
+var bIsUc= sUserAgent.match(/ucweb/i) == "ucweb";
+var bIsAndroid= sUserAgent.match(/android/i) == "android";
+var bIsCE= sUserAgent.match(/windows ce/i) == "windows ce";
+var bIsWM= sUserAgent.match(/windows mobile/i) == "windows mobile";
+
+if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
+ window.location.href= '/mobile/';
+}
+</script>
</head>
<body>
<style type="text/css">
@@ -18,20 +32,6 @@
</style>
<script language="JavaScript">
<!--
-var sUserAgent= navigator.userAgent.toLowerCase();
-var bIsIpad= sUserAgent.match(/ipad/i) == "ipad";
-var bIsIphoneOs= sUserAgent.match(/iphone os/i) == "iphone os";
-var bIsMidp= sUserAgent.match(/midp/i) == "midp";
-var bIsUc7= sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
-var bIsUc= sUserAgent.match(/ucweb/i) == "ucweb";
-var bIsAndroid= sUserAgent.match(/android/i) == "android";
-var bIsCE= sUserAgent.match(/windows ce/i) == "windows ce";
-var bIsWM= sUserAgent.match(/windows mobile/i) == "windows mobile";
-
-if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
- window.location.href= '/mobile/';
-}
-
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function photo_DoFSCommand(command, args) {

0 comments on commit 3601046

Please sign in to comment.