Skip to content

Commit

Permalink
Provide easy way to export to jsbeeb
Browse files Browse the repository at this point in the history
There used to be a button to do this, but it was repurposed to
export to virtualbeeb by 79fa8db.
  • Loading branch information
ojwb committed Jan 28, 2025
1 parent e40b663 commit 26b7fe2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/owlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,14 +426,25 @@ export class OwletEditor {
examples: () => this.selectView("examples"),
about: () => this.selectView("about"),

jsbeeb: () => {
virtualbeeb: () => {
const gxr = this.emulator.hasGxr() ? "&rom=gxr.rom" : "";
window.open(
`https://virtual.bbcmic.ro/?embedBasic=${encodeURIComponent(
this.getBasicText(),
)}${gxr}`,
"_blank",
)
this.closeModal();
},
jsbeeb: () => {
const gxr = this.emulator.hasGxr() ? "&rom=gxr.rom" : "";
window.open(
`https://bbc.xania.org/?embedBasic=${encodeURIComponent(
this.getBasicText(),
)}${gxr}`,
"_blank",
)
this.closeModal();
},
rocket: () => this.rocket(),
copy: () => {
Expand Down
4 changes: 3 additions & 1 deletion src/root.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h2><a class="name"></a>

</div>
<div class="footer" id="emu_footer">
<button data-action="jsbeeb" title="Load into a 3D emulator">3D</button>
<button data-action="virtualbeeb" title="Load into a 3D emulator">3D</button>
<button data-action="rocket" id="rocket" title="send to beebjit" style="display:none;"><i class="fa-solid fa-rocket" style="pointer-events: none;"></i></button>
<div id="emu_status"></div>
<div id="coords"></div>
Expand Down Expand Up @@ -92,6 +92,8 @@ <h3>About the Owlet BBC BASIC editor</h3>
<button data-action="copy">Copy as URL</button>
<button data-action="cassette">Tape</button>
<button data-action="disc">Disc</button>
<button data-action="jsbeeb">jsbeeb</button>
<button data-action="virtualbeeb">Virtualbeeb</button>
<button data-action="closeModal">Cancel</button>
</div>

Expand Down

0 comments on commit 26b7fe2

Please sign in to comment.