The state can be re-imported like this:
```
a = (insert JSON output here)
window.$nuxt.$root.$children[2].$children[0].$children[0]._data.elements = a.elements; window.$nuxt.$root.$children[2].$children[0].$children[0]._data.discoveries = a.discoveries;
```
I made a bookmarklet that loads the state from localstorage and also autosaves the state on each new craft
javascript:(function(){
const exportState = () => JSON.stringify({
discoveries: window.$nuxt.$root.$children[2].$children[0].$children[0]._data.discoveries,
elements: window.$nuxt.$root.$children[2].$children[0].$children[0]._data.elements
});
const importState = (state) => {
const { discoveries, elements } = JSON.parse(state);
const gameInstance = window.$nuxt.$root.$children[2].$children[0].$children[0]._data;
gameInstance.discoveries = discoveries;
gameInstance.elements = elements;
};
/* Set up a MutationObserver to listen for changes in the DOM and automatically export the current state. */
const observer = new MutationObserver((mutations) => {
const state = exportState();
localStorage.setItem('gameState', state);
});
/* Start observing DOM changes to auto-save the game state. */
const startObserving = () => {
const targetNode = document.querySelector('.sidebar');
observer.observe(targetNode, { childList: true, subtree: true });
};
/* Check for a saved state in localStorage and import it if available. */
const savedState = localStorage.getItem('gameState');
if (savedState) importState(savedState);
else localStorage.setItem('gameState', exportState() );
startObserving();
})();
This can be used to get a novel starting point (disregarding the original starting point).
It can also be used to start from unreachable elements, although it isn't clear to me exactly how the "First discovery" works, e.g. will your unreachable elements pollute the neal.fun datastore, or only the byproducts? Either way, it is interesting.
(Creator of the repo here) Likely ONLY due to HN, the stats for the repo have BLOWN UP in the last day. It went from ~200 unique visitors and visits in one day to 8,689 unique visitors with 10,000+ total visits!
I've not tested it further, but I wondered what happened when I saw a "Plus subscriber login link" input field - resulted in that. In fact, I wonder if one could automate the request to the API endpoint (all headers, authorization and everything) when the browser sees a "ChatGPT down" message. (Of course, you have to click the link in the email, but if you grant the tool access to your email to automate that, that probably isn't the best thing for "principle of least privilege")
In some of the ChatGPT client-side JS (visible in the Debugger tab of DevTools), I could see references like `\triangle`. However, asking ChatGPT to print either as it is just prints the text itself.
(Creator of the repo here) That is somewhat present in the `/backend-api/moderations` endpoint where the app sends your question + ChatGPT's response to (first time just your question, second time both)