aboutsummaryrefslogtreecommitdiff
path: root/web/script/backbutton.ts
blob: 4bd73c0a6a7f7e7cad158a0922d1a83147b6b9ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
    This file is part of jellything (https://codeberg.org/metamuffin/jellything)
    which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
    Copyright (C) 2023 metamuffin <metamuffin.org>
*/
import { e } from "./jshelper/mod.ts";

globalThis.addEventListener("DOMContentLoaded", () => {
    document.getElementsByTagName("nav").item(0)?.prepend(
        e("a", e("p", "Back"), { class: ["back", "hybrid_button"], onclick() { history.back() } })
    )
})