The old edit button redirects the user to /map/1/view. The way the code works is to merely append to url with an view. This worked before we add the # at the end of the url. Now the old code would result in in map/1/#full/view which of course would not work. This code handles that and strips the hash url off of href. 

Maybe I should update the comments if thats not clear.