Comment by 🦎 bluesman
@clseibold I'm glad you were inspired. That's saying something!
The one thing missing from the url parameter scheme is the inability to set the type 10 prompt text (instead of using generic verbiage with the variable name). My solution is to add the url encoded prompt to the variable name.
firstName:Enter%20your%20first%20name;lastName:Enter%20your%20last%20name
Once the vars are populated by the user, a redirect cleans it up for copy/paste/bookmarks, etc.
firstName=Joe;lastName=Smith
I'm also planning to pass in a boolean that the js code can use to check if there's a client certificate. The js code can then make a cert request if it's false. When there is a cert, a Java method to save a String or Map (probably length constrained) will be made available. There will be another method/function to load previously saved data for that client cert. This could be used for saving state without having to worry about packing it all into a url variable.
Jul 10 · 6 months ago
3 Later Comments ↓
@bluesman it doesn't "violate the spec" because it uses preformatted text. Then it is fair if I also want style guides and table processing? Adhoc with no cost benefit analysis? Unilaterally by whoever?
@clseibold I might have botched that analogy. I meant if the Atom could no longer squeeze through microscopic openings in the wall due to his new Sumo bod, he might want to rethink that cost benefit tradeoff.
@clarahd It wouldn't violate the spec if I used <script></script> instead of preformatted text. The pages fed into Scriptonite are basically templates that can also be viewed by any Gemini client. Preformatted text makes sense because that's how we view code in Gemini anyway.
I'm not sure about your analogy but if you want table formatting you could probably emulate what Gemipedia does in Scriptonite (or CGI if you have server access). That might be a cool library.
Original Post
I Added Scripting To Gemini — I wrote a gemlog about it. It doesn't break the spec and works in all clients. In a nutshell, it's a service that interprets gemini pages with embedded JavaScript. There are a couple example programs at the link including a simple game. Because scripts have the ability to request data from the user, it's much more useful than first thought.