Add metadata images to meta folder for consistency
Add metadata images to meta folder for consistency

file:a/index.html -> file:b/index.html
--- a/index.html
+++ b/index.html
@@ -6,6 +6,8 @@
 
   <link href="style/main.css" rel="stylesheet" type="text/css">
   <link rel="shortcut icon" href="favicon.ico">
+  <link rel="apple-touch-icon" href="/meta/apple-touch-icon.png">
+  <meta name="apple-mobile-web-app-capable" content="yes">
 
   <meta name="HandheldFriendly" content="True">
   <meta name="MobileOptimized" content="320">
@@ -69,7 +71,6 @@
   </div>
 
   <script src="js/animframe_polyfill.js"></script>
-  <script src="js/hammer.min.js"></script>
   <script src="js/keyboard_input_manager.js"></script>
   <script src="js/html_actuator.js"></script>
   <script src="js/grid.js"></script>

--- a/js/keyboard_input_manager.js
+++ b/js/keyboard_input_manager.js
@@ -60,11 +60,10 @@
   var touchStartClientX, touchStartClientY;
   var gameContainer = document.getElementsByClassName("game-container")[0];
   gameContainer.addEventListener("touchstart", function(event) {
-    if (event.touches.length > 1) {
-      return;
-    }
+    if (event.touches.length > 1) return;
+
     touchStartClientX = event.touches[0].clientX;
-    touchStartClientY = event.touches[0].clientY
+    touchStartClientY = event.touches[0].clientY;
     event.preventDefault();
   });
   gameContainer.addEventListener("touchmove", function(event) {
@@ -76,11 +75,13 @@
     }
     var dx = event.changedTouches[0].clientX - touchStartClientX;
     var absDx = Math.abs(dx);
+
     var dy = event.changedTouches[0].clientY - touchStartClientY;
     var absDy = Math.abs(dy);
+
     if (Math.max(absDx, absDy) > 10) {
-      self.emit("move", absDx > absDy ? (dx > 0 ? 1 : 3) : 
-        (dy > 0 ? 2 : 0)); // (right : left) : (down : up)
+      // (right : left) : (down : up)
+      self.emit("move", absDx > absDy ? (dx > 0 ? 1 : 3) : (dy > 0 ? 2 : 0));
     }
   });
 };

 Binary files /dev/null and b/meta/apple-touch-icon.png differ
--- a/style/main.css
+++ b/style/main.css
@@ -130,16 +130,6 @@
 
   100% {
     opacity: 1; } }
-
-.game-container .game-message a {
-  display: inline-block;
-  background: #8f7a66;
-  border-radius: 3px;
-  padding: 0 20px;
-  text-decoration: none;
-  color: #f9f6f2;
-  height: 40px;
-  line-height: 42px; }
 
 .game-container {
   margin-top: 40px;
@@ -180,6 +170,14 @@
       display: block;
       margin-top: 59px; }
     .game-container .game-message a {
+      display: inline-block;
+      background: #8f7a66;
+      border-radius: 3px;
+      padding: 0 20px;
+      text-decoration: none;
+      color: #f9f6f2;
+      height: 40px;
+      line-height: 42px;
       margin-left: 9px; }
     .game-container .game-message.game-won {
       background: rgba(237, 194, 46, 0.5);
@@ -504,6 +502,14 @@
         display: block;
         margin-top: 59px; }
       .game-container .game-message a {
+        display: inline-block;
+        background: #8f7a66;
+        border-radius: 3px;
+        padding: 0 20px;
+        text-decoration: none;
+        color: #f9f6f2;
+        height: 40px;
+        line-height: 42px;
         margin-left: 9px; }
       .game-container .game-message.game-won {
         background: rgba(237, 194, 46, 0.5);

comments