const refreshBtn = $.makeButton($.w/2,$.h/2-80,100,50,"refresh");
const saveBtn = $.makeButton($.w/2,$.h/2-130,100,50,"save");
const txt = $.makeTextArea($.w/2,$.h/2-180,100,50);
if($.storage.example !== undefined) {
//if a value doesn't exist it'll be undefined
txt.value=$.storage.example;
}
function update() {
if(refreshBtn.down) {
//refresh the page to see if what you typed saved!
window.location.reload();
}
if(saveBtn.released) {
$.storage.example = txt.value;
}
refreshBtn.draw();
saveBtn.draw();
txt.draw();
}