hide Dump again, hide Save on Firefox OS
authorRobert Kaiser <robert@widebook.box.kairo.at>
Mon, 22 Oct 2012 18:21:24 +0000 (20:21 +0200)
committerRobert Kaiser <robert@widebook.box.kairo.at>
Mon, 22 Oct 2012 18:21:24 +0000 (20:21 +0200)
index.html
js/ui.js

index d4b17c9..4cb6e44 100644 (file)
@@ -25,7 +25,7 @@
 <input type="button" id="saveTrackButton" value="Save"
        onclick="saveTrack();">
 <input type="button" id="dumpTrackButton" value="Dump"
-       onclick="saveTrackDump();" class="debugHideX">
+       onclick="saveTrackDump();" class="debugHide">
 <input type="button" id="clearTrackButton" value="Clear"
        onclick="clearTrack();"><br/>
 <input type="checkbox" id="trackCheckbox"
index 6566a86..7fb08b1 100644 (file)
--- a/js/ui.js
+++ b/js/ui.js
@@ -31,6 +31,11 @@ window.onload = function() {
     areas[i].addEventListener("touchleave", uiEvHandler, false);
   }
 
+  if (/Mozilla\/5.0 \(Mobile;/.test(navigator.useragent)) {
+    // For Firefox OS, don't display the "save" button.
+    // Do this by setting the debugHide class for testing in debug mode.
+    document.getElementById("saveTrackButton").classList.add("debugHide");
+  }
 
   initDB();
   initMap();