Skip to content

Commit

Permalink
make playground default to hello.asm
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdiacono committed Jan 25, 2025
1 parent 20b7557 commit 96822fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/playground/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ lang_packs.hum = lang_hum;
lang_packs.scm = lang_scm;
Object.freeze(lang_packs);

let initial_text = "; Write some uFork assembly here...";
let initial_text = "";
let text_override;

function is_landscape() {
Expand Down Expand Up @@ -108,7 +108,7 @@ function fetch_text() {
);
});
}
return Promise.resolve(initial_text);
return Promise.resolve("");
}

const editor = editor_ui({
Expand Down Expand Up @@ -195,6 +195,10 @@ const split = dom(
dom(tools, {slot: "peripheral"})
]
);

if (read_state("src") === undefined && read_state("text") === undefined) {
write_state("src", "../debugger/examples/hello.asm");
}
const src = read_state("src") || "";
const src_extension = src.split(".").pop();
const lang_override = read_state("lang");
Expand Down

0 comments on commit 96822fb

Please sign in to comment.