aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/src/routes/ui/style/playerconf-copy-url.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/routes/ui/style/playerconf-copy-url.js b/server/src/routes/ui/style/playerconf-copy-url.js
index 0145bd5..49f27fd 100644
--- a/server/src/routes/ui/style/playerconf-copy-url.js
+++ b/server/src/routes/ui/style/playerconf-copy-url.js
@@ -20,10 +20,11 @@ function patch_playerconf(form) {
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}`
+ 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)