diff options
author | metamuffin <metamuffin@disroot.org> | 2025-03-03 18:15:47 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-03-03 18:15:47 +0100 |
commit | bf84be508aa415b45a51fc0fe007a0879f7bfab7 (patch) | |
tree | 6a98c9a534dbb5eed899d0f9ff6f6499dddfd0db /web | |
parent | 26d3a70b0be2809177076e155f987e18e2b2ceb2 (diff) | |
download | jellything-bf84be508aa415b45a51fc0fe007a0879f7bfab7.tar jellything-bf84be508aa415b45a51fc0fe007a0879f7bfab7.tar.bz2 jellything-bf84be508aa415b45a51fc0fe007a0879f7bfab7.tar.zst |
nodepage in player and tags
Diffstat (limited to 'web')
-rw-r--r-- | web/script/player/mod.ts | 13 | ||||
-rw-r--r-- | web/style/layout.css | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/web/script/player/mod.ts b/web/script/player/mod.ts index 15c37da..53f13bd 100644 --- a/web/script/player/mod.ts +++ b/web/script/player/mod.ts @@ -18,10 +18,10 @@ globalThis.addEventListener("DOMContentLoaded", () => { if (globalThis.location.search.search("nojsp") != -1) return if (!globalThis.MediaSource) return alert("Media Source Extension API required") const node_id = globalThis.location.pathname.split("/")[2]; - const main = document.getElementById("main")!; - document.getElementsByTagName("footer")[0].remove() + document.getElementById("player")?.remove(); + document.getElementsByClassName("playerconf").item(0)?.remove() globalThis.dispatchEvent(new Event("navigationrequiresreload")) - initialize_player(main, node_id) + document.getElementById("main")!.prepend(initialize_player(node_id)) } }) @@ -37,9 +37,7 @@ function toggle_fullscreen() { } -function initialize_player(el: HTMLElement, node_id: string) { - el.innerHTML = "" // clear the body - +function initialize_player(node_id: string): HTMLElement { const logger = new Logger<string>(s => e("p", s)) const player = new Player(node_id, logger) const show_stats = new OVar(false); @@ -238,7 +236,6 @@ function initialize_player(el: HTMLElement, node_id: string) { popups, controls, ) - el.append(pel) controls.onmouseenter = () => idle_inhibit.value = true controls.onmouseleave = () => idle_inhibit.value = false @@ -281,6 +278,8 @@ function initialize_player(el: HTMLElement, node_id: string) { k.preventDefault() }) send_player_progress(node_id, player) + + return pel } function screenshot_video(video: HTMLVideoElement) { diff --git a/web/style/layout.css b/web/style/layout.css index a86f76d..a14c86e 100644 --- a/web/style/layout.css +++ b/web/style/layout.css @@ -53,7 +53,7 @@ h1, h2, h3, h4 { h1 { font-weight: bold; } -p, span, a, td, th, label, input, legend, pre, summary { +p, span, a, td, th, label, input, legend, pre, summary, li { color: var(--font); } |