ubik23 / charactercreator

A frontend interface for creating characters in SVG.
Other
306 stars 78 forks source link

Clicking site title doesn't erase the hash in the URL #129

Closed ubik23 closed 4 years ago

ubik23 commented 4 years ago

The 'gotoNewChar' function should erase the hash from the URL as well.

ubik23 commented 4 years ago

Check to see if we already have a function that does that. Perhaps in hash.min.js?

If not, create a new function to clear the hash and call it within the 'gotoNewChar' function.

ubik23 commented 4 years ago

I tested 'hash.clear' in the console and it works, add that to the 'gotoNewChar' function.

millette commented 4 years ago

If you don't mind reloading the browser:

window.location.href="/"

If you don't mind keeping the "#" but don't want to reload the page:

window.location.hash=""
ubik23 commented 4 years ago

I'd rather not reload the browser.

window.location.hash='' is probably the simplest way. (I used single quotes since we're using standard/standard now)

https://standardjs.com/rules.html