mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-11-26 09:27:30 +00:00
Preserve session-watched param on auto-proceed
This commit is contained in:
parent
2b2f8bf84a
commit
e0238d7e7d
@ -6,8 +6,9 @@ console.log
|
|||||||
|
|
||||||
video.addEventListener("ended", () => {
|
video.addEventListener("ended", () => {
|
||||||
if (data.continuous) {
|
if (data.continuous) {
|
||||||
const first = data.recommendedVideos[0]
|
const first = q("#continuous-first")
|
||||||
window.location.assign(`/watch?v=${first.videoId}&continuous=1`)
|
const url = first.querySelector(".title-link").href
|
||||||
|
location.assign(url)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ block content
|
|||||||
if first
|
if first
|
||||||
script(type="module" src=getStaticURL("html", "/static/js/continuous.js"))
|
script(type="module" src=getStaticURL("html", "/static/js/continuous.js"))
|
||||||
noscript
|
noscript
|
||||||
meta(http-equiv="refresh" content=`${video.lengthSeconds+5};url=/watch?v=${first.videoId}&continuous=1`)
|
meta(http-equiv="refresh" content=`${video.lengthSeconds+5};url=/watch?v=${first.videoId}&continuous=1&session-watched=${sessionWatchedNext}`)
|
||||||
main.video-page
|
main.video-page
|
||||||
.main-video-section
|
.main-video-section
|
||||||
.video-container
|
.video-container
|
||||||
@ -91,6 +91,7 @@ block content
|
|||||||
if column.length
|
if column.length
|
||||||
.related-cols
|
.related-cols
|
||||||
h2.related-header Autoplay next
|
h2.related-header Autoplay next
|
||||||
|
#continuous-first
|
||||||
+video_list_item("related-video", column.shift(), instanceOrigin, {continuous: true})
|
+video_list_item("related-video", column.shift(), instanceOrigin, {continuous: true})
|
||||||
if column.length
|
if column.length
|
||||||
.related-cols
|
.related-cols
|
||||||
|
Loading…
Reference in New Issue
Block a user