MCPcopy Create free account
hub / github.com/aosabook/500lines / clearScript

Function clearScript

blockcode/code/file.js:31–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 function restoreLocal(){ jsonToScript(localStorage[title] || '[]' ); }
30
31 function clearScript(){
32 [].slice.call(document.querySelectorAll('.script > .block')).forEach(function(block){
33 block.parentElement.removeChild(block);
34 });
35 Menu.runSoon();
36 }
37
38 function saveFile(evt){
39 var title = prompt("Save file as: ");

Callers 2

jsonToScriptFunction · 0.85
loadExampleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected