Skip to content

Commit

Permalink
Gallery "Run app" links work.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengarrett committed Sep 26, 2024
1 parent 9e27555 commit 17c2ff3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion view/app/artifactjsdos.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</div>
</div>
<input type="hidden" id="jsdos-utilties" name="jsdos-utilties" value="{{$loadUtils}}">
<script defer>
<script async="false">
const canvas = document.getElementById("jsdos6");
const ctx = canvas.getContext("2d");
const loadUtils = document.getElementById("jsdos-utilties").value;
Expand Down
10 changes: 6 additions & 4 deletions view/app/layout.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,17 @@
{{- if $jsdos}}
<script async src="{{ jsdos6JS }}?{{ sri_jsdos6JS }}" integrity="{{ sri_jsdos6JS }}" crossorigin="anonymous"></script>
<script async src="{{ dosboxJS }}?{{ sri_dosboxJS }}" integrity="{{ sri_dosboxJS }}" crossorigin="anonymous"></script>
<script defer>
<script async="false">
document.addEventListener("DOMContentLoaded", () => {
const jsdosModal = document.getElementById("js-dos-modal");
if (jsdosModal != null) {
const parsedUrl = new URL(window.location.href);
if (parsedUrl.hash == `#runapp`) {
console.info(`Do an automatic launch and run of the DOS application.`)
document.getElementById("js-dos-run-app").click();
history.replaceState(null, "", window.location.pathname);
window.onload = () => {
document.getElementById("js-dos-run-app").click();
history.replaceState(null, "", window.location.pathname);
};
}
}
});
Expand All @@ -364,7 +366,7 @@
<script defer src="{{ layoutJS }}?{{ sri_layoutJS }}" integrity="{{ sri_layoutJS }}" crossorigin="anonymous"></script>
{{- /* Bootstrap carousel initalizer (relies on the template and cannot be moved to a JS file) */}}
{{- if ne $carousel ""}}
<script defer>
<script async="false">
(() => {
const myCarouselElement = document.querySelector('{{$carousel}}');
if (myCarouselElement === null) {
Expand Down

0 comments on commit 17c2ff3

Please sign in to comment.