]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/welcome.js
Don't disable History button
[rails.git] / app / assets / javascripts / welcome.js
index 60648383adc10efa3979950848b5ef47c834be2c..56c454ac4aeaa731d63b064f56db39f6a1c7315b 100644 (file)
@@ -25,12 +25,6 @@ $(document).ready(function() {
       });
     }
 
-    function geoError() {
-      $('.start-mapping')
-        .removeClass('loading')
-        .addClass('error');
-    }
-
     $('.start-mapping').on('click', function(e) {
       e.preventDefault();
 
@@ -39,9 +33,15 @@ $(document).ready(function() {
 
       // handle firefox's weird implementation
       // https://bugzilla.mozilla.org/show_bug.cgi?id=675533
-      window.setTimeout(geoError, 4000);
+      window.setTimeout(manualEdit, 4000);
 
-      navigator.geolocation.getCurrentPosition(geoSuccess, geoError);
+      navigator.geolocation.getCurrentPosition(geoSuccess, manualEdit);
     });
+  } else {
+    manualEdit();
+  }
+
+  function manualEdit() {
+    window.location = '/?edit_help=1'
   }
 });