This would allow things like linking to a specific heading in the tutorial, for example.

You could also make the hash accessible to the generator app. (I don’t know if the url is already available.)

  • VioneTM
    link
    English
    13 months ago

    You could get the hash with:

    new URL(window.location.href).hash
    

    That includes the # so you can also .slice(1) to remove it.

    You may also want to use decodeURI to fix the %20 or other URL encoded characters.

    • @wthit56OP
      link
      English
      13 months ago

      Okay cool. I know you can use window.location.hash in JS, I just don’t know what parts are accessible to generators and what’s locked off is all. :D

      Main thing is, making the has work in the first place.