diff options
Diffstat (limited to 'web/script')
-rw-r--r-- | web/script/backbutton.ts | 5 | ||||
-rw-r--r-- | web/script/player/download.ts | 5 | ||||
-rw-r--r-- | web/script/player/jhls.d.ts | 5 | ||||
-rw-r--r-- | web/script/player/mediacaps.ts | 5 | ||||
-rw-r--r-- | web/script/player/player.ts | 5 | ||||
-rw-r--r-- | web/script/player/popup.ts | 5 | ||||
-rw-r--r-- | web/script/player/profiles.ts | 5 | ||||
-rw-r--r-- | web/script/player/track.ts | 5 | ||||
-rw-r--r-- | web/script/playerconf-copy-url.js | 32 |
9 files changed, 40 insertions, 32 deletions
diff --git a/web/script/backbutton.ts b/web/script/backbutton.ts index 3e62165..3b11c2a 100644 --- a/web/script/backbutton.ts +++ b/web/script/backbutton.ts @@ -1,3 +1,8 @@ +/* + 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", () => { diff --git a/web/script/player/download.ts b/web/script/player/download.ts index 1799070..2c3b104 100644 --- a/web/script/player/download.ts +++ b/web/script/player/download.ts @@ -1,3 +1,8 @@ +/* + 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 { OVar } from "../jshelper/mod.ts"; interface Measurement { time: number, duration: number, size: number } diff --git a/web/script/player/jhls.d.ts b/web/script/player/jhls.d.ts index b38f1b1..e1948ca 100644 --- a/web/script/player/jhls.d.ts +++ b/web/script/player/jhls.d.ts @@ -1,3 +1,8 @@ +/* + 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> +*/ export interface TimeRange { start: number, end: number } export interface JhlsMetadata { diff --git a/web/script/player/mediacaps.ts b/web/script/player/mediacaps.ts index dca5c53..357c813 100644 --- a/web/script/player/mediacaps.ts +++ b/web/script/player/mediacaps.ts @@ -1,3 +1,8 @@ +/* + 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 { EncodingProfile, SourceTrack, SourceTrackKind } from "./jhls.d.ts"; const cache = new Map<string, boolean>() diff --git a/web/script/player/player.ts b/web/script/player/player.ts index c87ae8f..c07fa37 100644 --- a/web/script/player/player.ts +++ b/web/script/player/player.ts @@ -1,3 +1,8 @@ +/* + 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 { OVar, e } from "../jshelper/mod.ts"; import { JhlsMetadata, JhlsTrack, TimeRange } from "./jhls.d.ts"; import { SegmentDownloader } from "./download.ts"; diff --git a/web/script/player/popup.ts b/web/script/player/popup.ts index 39b5b0f..394f572 100644 --- a/web/script/player/popup.ts +++ b/web/script/player/popup.ts @@ -1,3 +1,8 @@ +/* + 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> +*/ export class Popup { trigger_hov = false diff --git a/web/script/player/profiles.ts b/web/script/player/profiles.ts index 27c8474..9284ec5 100644 --- a/web/script/player/profiles.ts +++ b/web/script/player/profiles.ts @@ -1,3 +1,8 @@ +/* + 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 { OVar } from "../jshelper/mod.ts"; import { EncodingProfile, JhlsMetadata } from "./jhls.d.ts"; import { profile_to_partial_track, test_media_capability } from "./mediacaps.ts"; diff --git a/web/script/player/track.ts b/web/script/player/track.ts index c7d90da..e95ba85 100644 --- a/web/script/player/track.ts +++ b/web/script/player/track.ts @@ -1,3 +1,8 @@ +/* + 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 { SourceTrack, TimeRange } from "./jhls.d.ts"; import { OVar } from "../jshelper/mod.ts"; import { JhlsTrack } from "./jhls.d.ts"; diff --git a/web/script/playerconf-copy-url.js b/web/script/playerconf-copy-url.js deleted file mode 100644 index 49f27fd..0000000 --- a/web/script/playerconf-copy-url.js +++ /dev/null @@ -1,32 +0,0 @@ - -globalThis.addEventListener("load", () => { - for (const e of document.getElementsByClassName("playerconf")) - patch_playerconf(e) -}) - -function patch_playerconf(form) { - const submit = form.lastChild - - const copyurl = document.createElement("button") - const d = document.createElement("div") - form.removeChild(submit) - d.appendChild(submit) - d.appendChild(copyurl) - form.append(d) - - copyurl.textContent = "Copy Stream URL" - d.style.gridArea = "b" - d.style.width = "100%" - copyurl.style.width = "5em" - - copyurl.addEventListener("click", ev => { - const session = document.cookie.split(";").map(e => e.trim().split("=")).find(e => e[0] == "session")[1] - ev.preventDefault() - const fd = new FormData(form) - const sp = ["v", "a", "s"].map(k => fd.get(k)).filter(k => k != "").flat() - const url = `${window.location.protocol}//${window.location.host}/n/${window.location.pathname.split("/")[2]}/stream?tracks=${sp}&session=${session}` - navigator.clipboard.writeText(url) - copyurl.textContent = "Copied" - setTimeout(() => copyurl.textContent = "Copy Stream URL", 1000) - }) -} |