I think I would be good. They are using the ace text editor, so something simple like:
on pageload:
var t = localStorage.getItem("textbackup");
if (t){
__editor.setValue(t);
console.log('restoring from backup');
} else {
__editor.setValue(document.getElementById('basic_intro').innerHTML);
console.log('putting in the intro');
}
and on any action:
var text = __editor.getValue();
localStorage.setItem('textbackup', text);
That's definitely useful, but the current Rust playground already does this (sorry for not being clear in my post). I meant a more full-featured history where you can view multiple previous edits, not just restore the last one.
My original plan was to use results from this to pick colours for my other project (a graphing program). But I really just ended up with a toy that I found fun to play with. I probably could get a 3D version for HCL, that will be another weekend project.
If I may propose my own solution [0]. It has no dependencies and is quite interactive for analysis (regression, measurements, and predictions). However not very customisable and lacks a good method for handling date/time data.
http://xqt2.com/p/colours_sim_HUSL.html
You can toggle between normal HSL and HUSL. I find that the greens are too suppressed for my liking.