Allow two-column layout on smaller screens. Update codemirror. Disable "load program" button if nothing in storage.

This commit is contained in:
Joshua Bell
2012-06-20 11:54:40 -04:00
parent 783b85a8db
commit d7b3a08957
2 changed files with 5 additions and 5 deletions

View File

@@ -129,10 +129,12 @@ window.onload = function () {
addEvent($('#btn_save'), 'click', function () {
window.localStorage.setItem("save_program", getSource());
$('#btn_load').disabled = false;
});
addEvent($('#btn_load'), 'click', function () {
setSource(window.localStorage.getItem("save_program"));
});
$('#btn_load').disabled = (window.localStorage.getItem("save_program") === null);
// Add a "printer" on demand
addEvent($('#btn_capture'), 'click', function () {