Don't try to route external URLs
authorJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 8 Oct 2013 23:52:53 +0000 (16:52 -0700)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Sun, 13 Oct 2013 21:46:10 +0000 (14:46 -0700)
app/assets/javascripts/index.js

index ef23e340d36a6015896e7dd2d82c967ea8b3a9a5..77b247c10fb0c1b294a9118749b5068662a87c5d 100644 (file)
@@ -293,7 +293,7 @@ $(document).ready(function () {
 
   $(document).on("click", "a", function(e) {
     if (e.isPropagationStopped()) return;
-    if (OSM.route(this.pathname + this.search + this.hash)) e.preventDefault();
+    if (this.host === window.location.host && OSM.route(this.pathname + this.search + this.hash)) e.preventDefault();
   });
 
   $("#search_form").on("submit", function(e) {