deathandmayhem / jolly-roger

Dead men tell no tales!
MIT License
18 stars 5 forks source link

Make new puzzle entry easier #237

Open ebroder opened 5 years ago

ebroder commented 5 years ago

Instead of requiring operators to enter details about puzzles by hand, we should try to do something smarter. There are a few options:

zarvox commented 1 year ago

Another light automation idea here: we could make the puzzle entry form start out with the URL input at the top, and when that input is changed, attempt a fetch() on the URL, and attempt to autofill the puzzle title field with a suggestion by extracting the <title> or a plausible <h1> from the loaded puzzle page, which could potentially reduce copy-pasting/typing.

I imagine operators would still probably need to do some amount of trimming of excess content from autofilled titles, since I suspect they may wind up being like "Puzzle title -- Maybe round title -- Mystery Hunt 2018".

ebroder commented 1 year ago

I could see that working, although I will note that it could break flow for the operator a little bit, as basically while I'm entering a puzzle, I have to sit while I wait for JR to fetch and process the URL, during which time I can't do anything. I can see that coming up especially when there are multiple new puzzles released - today there aren't any delays from JR, just delays from me going back and forth between tabs and copy/pasting things.

zarvox commented 1 year ago

After poking at it briefly, I think CORS means my idea (doing the fetch() from the user's browser) isn't viable in general, and doing it server-side would require the server to keep credentials/cookies, which I think exceeds the complexity budget I'd given myself.

A bookmarklet might still be worth investigating. We could make it so that if your URL had a particular pattern in the fragment we auto-show the add puzzle modal and fill it with other values from the fragment, and then we just make the bookmarklet stuff the title & location in there?