if (elt.id != element) elt.style.display = "none";
     else elt.style.display = "block";
   }
-  if (element.id == "boardContainer") {
+  if (element == "boardContainer") {
     // Avoid smartphone scrolling effects (TODO?)
     document.querySelector("html").style.overflow = "hidden";
     document.body.style.overflow = "hidden";
   else {
     document.querySelector("html").style.overflow = "visible";
     document.body.style.overflow = "visible";
-    if (element.id == "newGame") {
+    if (element == "newGame") {
       // Workaround "superposed texts" effect
       inputName.focus();
       inputName.blur();