mirror of
https://github.com/teacat/chaturbate-dvr.git
synced 2025-10-29 16:59:59 +00:00
Fixed #117 as @lil-bandit mentioned
This commit is contained in:
parent
8502d4429f
commit
6aebcd723e
@ -284,10 +284,13 @@
|
||||
<script>
|
||||
// before content was swapped by HTMX
|
||||
document.body.addEventListener("htmx:sseBeforeMessage", function (e) {
|
||||
// stop it if "auto-update" was unchecked
|
||||
if (!e.detail.elt.closest(".ts-box").querySelector("[type=checkbox]").checked) {
|
||||
e.preventDefault()
|
||||
return
|
||||
// ignore anything with `-log` content swap if "auto-update" was unchecked
|
||||
let sswe_id = e.detail.elt.getAttribute('sse-swap')
|
||||
if (sswe_id && sswe_id.endsWith("-log") ) {
|
||||
if (!e.detail.elt.closest(".ts-box").querySelector("[type=checkbox]").checked) {
|
||||
e.preventDefault()
|
||||
return
|
||||
}
|
||||
}
|
||||
// else scroll the textarea to bottom with async trick
|
||||
setTimeout(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user