projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d31fc7c
)
Add a hash if one isn't already present
author
John Firebaugh
<john.firebaugh@gmail.com>
Thu, 8 Aug 2013 18:51:13 +0000
(11:51 -0700)
committer
John Firebaugh
<john.firebaugh@gmail.com>
Thu, 8 Aug 2013 18:51:13 +0000
(11:51 -0700)
app/views/site/id.html.erb
patch
|
blob
|
history
diff --git
a/app/views/site/id.html.erb
b/app/views/site/id.html.erb
index 53e177a3fb90a75f45c903f67bdc8c27820fb0c5..1b4cdf1bbb778f3bd6a76d27d543ed452c8ca1d9 100644
(file)
--- a/
app/views/site/id.html.erb
+++ b/
app/views/site/id.html.erb
@@
-51,7
+51,7
@@
// http://bl.ocks.org/jfirebaugh/5439412
var hash = parent.OSM.formatHash({ lon: center[0], lat: center[1], zoom: zoom });
if (hash !== parent.location.hash) {
- parent.location.replace(parent.location.href.replace(/
#.*
/, hash));
+ parent.location.replace(parent.location.href.replace(/
(#.*|$)
/, hash));
}
}));