src/glkote/dialog.js
/* Store a snapshot (a JSONable object) in a signature-dependent location.
   If snapshot is null, delete the snapshot instead.

   We rely on JSON.stringify() and JSON.parse(); autosave is primarily
   for the Electron environment.
*/
Store a snapshot (a JSONable object) in a signature-dependent location.
If snapshot is null, delete the snapshot instead.

We rely on JSON.stringify() and JSON.parse(); autosave is primarily
for the Electron environment.
Store a snapshot ( a JSONable object ) in a signature - dependent location . If snapshot is null delete the snapshot instead . We rely on JSON . stringify () and JSON . parse () ; autosave is primarily for the Electron environment .
function autosave_write(signature, snapshot) {
    var key = 'autosave:' + signature;
    if (!snapshot) {
        localStorage.removeItem(key);
    }
    else {
        localStorage.setItem(key, JSON.stringify(snapshot));
    }
}
function autosave_write ( signature , snapshot ) { var key = 'autosave:' + signature ; if ( ! snapshot ) { localStorage . removeItem ( key ) ; } else { localStorage . setItem ( key , JSON . stringify ( snapshot ) ) ; } }
Store a snapshot (a JSONable object) in a signature-dependent location.
Store a snapshot ( a JSONable object ) in a signature - dependent location .