diff --git a/web/democode/perleditor.html b/web/democode/perleditor.html index 0c66b00..d9fd4f3 100644 --- a/web/democode/perleditor.html +++ b/web/democode/perleditor.html @@ -214,6 +214,7 @@ function setupInputFile (inp) { fetchUrl(inp.url,cm); } +//TODO: implement a "get URL" feature function getFileData () { var filedata = {}; // script @@ -228,7 +229,7 @@ function getFileData () { var fn = $('>.filename',div).text(); var text = div.data('CodeMirrorInstance').getValue(); if (!filedata["inputs"]) filedata.inputs = []; - filedata.inputs.push([fn, text]); + filedata.inputs.push( { fn:fn, text:text } ); }); // outputs $('.outputs').each(function () { diff --git a/web/democode/perlrunner.html b/web/democode/perlrunner.html index 88f38df..e804302 100644 --- a/web/democode/perlrunner.html +++ b/web/democode/perlrunner.html @@ -155,7 +155,7 @@ window.addEventListener('message', function (event) { //TODO Later: can we support STDIN? (probably need to look at webperl.js) if (rp["inputs"]) rp.inputs.forEach(function (inp) { - saveFile(inp[0], inp[1]); + saveFile(inp.fn, inp.text); }); curOutputFiles = rp["outputs"]; Perl.start( rp["argv"] ? rp.argv : [] );