alexmoon / ksp

Kerbal Space Program Mission Plotter
Other
185 stars 75 forks source link

Change url hash to reflect base parameters #15

Closed mercutiodesign closed 8 years ago

mercutiodesign commented 9 years ago

Whenever a user plots a mission the hash part of the url gets updated with the basic mission parameters. This hash gets parsed when the site is loaded and whenever the user navigates (for example by using the browser's back button / clicking on a bookmark).

This is just some functionality that I found useful and I thought others might benefit from this as well.

Just as a heads up, when compiling with CoffeeScript 1.9.2 I had to change one line in src/missionform.coffee as seen in this commit: 4cf8a1e267c4d8dfceca856e5062fc1b1c42e207

I'm a newbie to coffeescript so if I did something wrong / not optimally I would love a heads up!