Open Ragzouken opened 8 years ago
Do you need to read the window.location
field directly or if you had a API to get parameters would it work? I'm thinking we'll expose an API that web games can use that can expose certain things about the parent page.
Note that web games already have access to some itch-specific values (see 'Accessing the API key in HTML5 games' section in https://itch.io/docs/itch/integrating/manifest.html) it'd be nice if it was consistent :)
I don't need direct access to window.location, though it would be good if I could also write/update the GET parameters as well as reading them (I guess I could instead write out the URL as a hyperlink in the game HTML page)
here's an example of what i want from this feature: https://ragzouken.github.io/?id=deb8636d4f9ca5bbca67dfd088097ca2
i read that "id" value in the url, and i use "window.history.pushState" to update "id" in the url when the project is re-exported
hey i am now working on yet another thing that would benefit from this, and wondering if it might be implemented in the forseeable future?
I'm also looking for a way to read query strings from within my HTML5 game, is this feature still planned?
I've tried accessing "document.referrer" but it only returns the origin of the top-level URL; would it be feasible to change the Referrer-Policy so content hosted on your CDN can access the query string of the itch.io URL? Thanks a bunch.
This would be super helpful
I too would like to see the URL parameters accessible in HTML games, it would be very useful
Hello, 8 years later I'm wondering if there is a way to do this yet. I'd love to use it to create invite codes so a user can share a link for online multiplayer.
I'll see you all in 2050 when we finally get this very simple feature.
My usecase for this is I would like to make a puzzlescript style thing where the url contains an identifier used to download a saved project so users can share things via urls. I don't actually know if that is against itch.io security policies either...