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