aboutsummaryrefslogtreecommitdiff
path: root/web/script/backbutton.ts
blob: 3b11c2a70bef640cdaf0522b7c8a14058bd3df26 (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", "Back", { id:"back", onclick() { history.back() } })
    )
})