| if (data) RED.nodes.import(data, false); | if (data) RED.nodes.import(data, false); | ||||
| } | } | ||||
| } | } | ||||
| function clear() { | |||||
| // TOOD: use setTimeout to limit the rate of changes? | |||||
| if (localStorage) { | |||||
| localStorage.removeItem("audio_library_guitool"); | |||||
| //console.log("localStorage write"); | |||||
| } | |||||
| } | |||||
| return { | return { | ||||
| update: update, | update: update, | ||||
| load: load | |||||
| load: load, | |||||
| clear: clear | |||||
| } | } | ||||
| })(); | })(); |