Make hls playback function with infinite scroll again

This commit is contained in:
Butter Cat 2023-11-17 08:57:30 -05:00
parent 7749c754bc
commit 5eb010e7cd

View file

@ -1,5 +1,6 @@
// @license http://www.gnu.org/licenses/agpl-3.0.html AGPL-3.0
// SPDX-License-Identifier: AGPL-3.0-only
function playVideo() {
const video_overlay = document.getElementsByClassName("video-overlay");
for (var i = 0 ; i < video_overlay.length; i++) {
@ -27,4 +28,13 @@ for (var i = 0 ; i < video_overlay.length; i++) {
}
});
}
}
var observer = new MutationObserver(function () {
playVideo()
});
playVideo()
observer.observe(document.body, {childList: true, subtree: true});
// @license-end