OSDN Git Service

make users jump to the mobile site when they come with mobile devices
authormshio <mshio@54a90f34-5e62-402c-8eae-46c47f0b2e07>
Sun, 23 Feb 2014 06:51:02 +0000 (06:51 +0000)
committermshio <mshio@54a90f34-5e62-402c-8eae-46c47f0b2e07>
Sun, 23 Feb 2014 06:51:02 +0000 (06:51 +0000)
git-svn-id: svn+ssh://svn.osdn.net/svnroot/sawarabi-fonts/trunk@128 54a90f34-5e62-402c-8eae-46c47f0b2e07

html/en/index.html
html/js/mobile.js

index 9e7210e..8ca3136 100644 (file)
@@ -4,6 +4,7 @@
 <meta http-equiv="content-type" content="text/html; charset=utf-8">
 <title>Sawarabi Fonts</title>
 <link rel="stylesheet" href="../css/style.css" type="text/css" />
+<script src="../js/mobile.js" type="text/javascript"></script>
 <script src="../js/jquery-2.1.0.min.js" type="text/javascript"></script>
 <script src="../js/lang.js" type="text/javascript"></script>
 <script src="../js/doc-header.js" type="text/javascript"></script>
index 97adda6..706427c 100644 (file)
@@ -1,4 +1,7 @@
 (function() {
     var o = function(d) { return navigator.userAgent.indexOf(d) > 0; };
-    if (o('iPhone') || o('iPod') || o('Android')) location.href = './mobile/index.html';
+    if (o('iPhone') || o('iPod') || o('Android')) {
+       path = location.pathname;
+       location.href = '/mobile' + path;
+    }
 })();