INNER CODE UNIT · JavaScript
downloadData
Booodaness/Scientific-Notes · Booodaness/_Assets/Presentations/phase-space-analysis-harmonic-oscillators.md/plugin/chalkboard/plugin (copy).js:457
function downloadData() {
var a = document.createElement('a');
document.body.appendChild(a);
try {
a.download = "chalkboard.json";
var blob = new Blob( [ getData() ], { type: "application/json"} );
a.href = window.URL.createObjectURL( blob );
} catch( error ) {
a.innerHTML += " (" + error + ")";
}
a.click();
document.body.removeChild(a);
}
/**
* Returns data object for the slide with the given indices.
*/
function getSlideData( indices, id ) {