diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/script/backbutton.ts | 8 | ||||
-rw-r--r-- | web/script/main.ts | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/web/script/backbutton.ts b/web/script/backbutton.ts new file mode 100644 index 0000000..c1225c0 --- /dev/null +++ b/web/script/backbutton.ts @@ -0,0 +1,8 @@ +import { e } from "./jshelper/mod.ts"; + +globalThis.addEventListener("DOMContentLoaded", () => { + document.getElementsByTagName("nav").item(0)?.prepend( + e("a", "<- Back", { onclick() { history.back() } }) + ) +}) + diff --git a/web/script/main.ts b/web/script/main.ts index e2a5045..dd168d5 100644 --- a/web/script/main.ts +++ b/web/script/main.ts @@ -5,3 +5,4 @@ */ import "./player/mod.ts" import "./transition.ts" +import "./backbutton.ts" |