3 ms·
Not for work but for fun. I made a notebook that could be saved as a bookmark. So when you run the bookmark it would reopen the notebook where you left off. T
by purple-leafy 3y ago
Not for work but for fun.
I made a notebook that could be saved as a bookmark. So when you run the bookmark it would reopen the notebook where you left off.
The bookmark was basically a JavaScript executable that saved data to itself and printed its own contents to the screen.
A cross device Quine without a server
- exikyut 3y agoBrowsers don't have a bookmark API that lets you rewrite the contents of bookmarklets et al. How did it rewrite itself? Also, are you referring to something like a Jupyter notebook?
- purple-leafy 3y agoHere’s a link to it to try yourself :) https://github.com/con-dog/serverless-architecture https://github.com/con-dog/serverless-architecture I should Have added more context. As you write in the notebook/notepad, it updates a visual link at the bottom of the note. The link says “Drag me to the bookmarks bar”. You can drag it and it re-saves the executable including its data and timestamps the bookmark. From memory it rewrites itself because the link itself is self-hosting state and executable of the page itself. That’s the Quine part, so when you save that link you’re saving the entire notebook “engine” + the state. Was really fun to make in an evening Nah it’s just a plain notebook/notepad, but I was also thinking of making something similar as a JavaScript scratch pad too that works in the same way, but would be an IDE + runnable snippets. Same concept, a Quine + bookmarklet that can sync between devices without a server