Zeige Kurse im Mitgliederbereich und mach hochgeladene Fassungen ansehbar.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b374335b3a
commit
4f2e5a5f3b
24 files changed
+413
-47
No files matched your search
+31
-1
@@ -1 +1,31 @@
|
||||
//
|
||||
document.addEventListener('click', (event) => {
|
||||
const decision = event.target.closest('[data-course-decision]');
|
||||
const restart = event.target.closest('[data-course-restart]');
|
||||
const button = decision || restart;
|
||||
|
||||
if (!button) {
|
||||
return;
|
||||
}
|
||||
|
||||
const video = button.closest('li')?.querySelector('video');
|
||||
|
||||
if (!video) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (restart) {
|
||||
video.currentTime = 0;
|
||||
video.play();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const at = Number(video.dataset.decision);
|
||||
|
||||
if (Number.isNaN(at)) {
|
||||
return;
|
||||
}
|
||||
|
||||
video.currentTime = at;
|
||||
video.pause();
|
||||
});
|
||||
Reference in new issue
Block a user