Merge pull request #22 from ghoullier/master
Merge pull request #22 from ghoullier/master

Use querySelector instead of getElementsByClassName

file:a/index.html -> file:b/index.html
--- a/index.html
+++ b/index.html
@@ -6,8 +6,6 @@
 
   <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">

--- a/js/html_actuator.js
+++ b/js/html_actuator.js
@@ -1,7 +1,7 @@
 function HTMLActuator() {
-  this.tileContainer    = document.getElementsByClassName("tile-container")[0];
-  this.scoreContainer   = document.getElementsByClassName("score-container")[0];
-  this.messageContainer = document.getElementsByClassName("game-message")[0];
+  this.tileContainer    = document.querySelector(".tile-container");
+  this.scoreContainer   = document.querySelector(".score-container");
+  this.messageContainer = document.querySelector(".game-message");
 
   this.score = 0;
 }

 Binary files a/meta/apple-touch-icon.png and /dev/null differ
comments