+ var areas = document.getElementsByClassName('overlayArea');
+ for (var i = 0; i <= areas.length - 1; i++) {
+ areas[i].addEventListener("mouseup", uiEvHandler, false);
+ areas[i].addEventListener("mousemove", uiEvHandler, false);
+ areas[i].addEventListener("mousedown", uiEvHandler, false);
+ areas[i].addEventListener("mouseout", uiEvHandler, false);
+
+ areas[i].addEventListener("touchstart", uiEvHandler, false);
+ areas[i].addEventListener("touchmove", uiEvHandler, false);
+ areas[i].addEventListener("touchend", uiEvHandler, false);
+ areas[i].addEventListener("touchcancel", uiEvHandler, false);
+ areas[i].addEventListener("touchleave", uiEvHandler, false);
+ }
+
+ document.getElementById("body").addEventListener("keydown", uiEvHandler, false);
+
+ if (navigator.platform.length == "") {
+ // 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");
+ // For now, only show the upload UI on Firefox OS.
+ document.getElementById("uploadTrackButton").classList.remove("debugHide");
+ // Without OAuth, the login data is useless
+ //document.getElementById("uploadSettingsArea").classList.remove("debugHide");
+ }
+
+ if (gDebug) {
+ gOSMAPIURL = "http://api06.dev.openstreetmap.org/";
+ }
+