mirror of
https://github.com/inexorabletash/jsbasic.git
synced 2025-07-25 05:24:29 +00:00
Allow two-column layout on smaller screens. Update codemirror. Disable "load program" button if nothing in storage.
This commit is contained in:
2
index.js
2
index.js
@@ -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 () {
|
||||
|
Reference in New Issue
Block a user