Save generated loadout to URL and allow loading it from there#1
Open
cb109 wants to merge 1 commit intoGrafKnusprig:masterfrom
Open
Save generated loadout to URL and allow loading it from there#1cb109 wants to merge 1 commit intoGrafKnusprig:masterfrom
cb109 wants to merge 1 commit intoGrafKnusprig:masterfrom
Conversation
Loadout is stored as ?loadout=... query parameter. Reloading the page will load the loadout from that if possible, meaning the URL can be copied and shared with friends for them to see the same loadout. If the value cannot be parsed correctly (e.g. someone has copied only some part of it), a new loadout will be generated instead. Pressing the Go button will always generate a new loadout.
Owner
|
Nice to hear that you like the randomizer :) I kind of like the idea and will take a closer look.
I am a little busy at the moment, but I will definitely give this a try. :) |
Author
|
Yes that sounds like an improvement over my just-dump-it-all approach :D It will also be more resilient to changes of the internally used dataset, aka URLs won't break as likely if used as bookmarks 👍 See you in the bayou 🤠 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nice loadout randomizer, love the slotmachine effect :) 👋
I thought about using this with a friend to get some loadout inspirations, but not being able to share is a bit of a bummer. I did a quick prototype of how that could work by mapping the generated loadout to a URL that can be shared:
?loadout=...query parameter.Let me know if this is something that you can think of adding, and what I could modify to make that easier. No worries if you don't like it, it was fun to build anyway!
Cheers