mirror of
https://codeberg.org/ashley/poke
synced 2025-04-06 09:38:00 +00:00
add jump to time v2
This commit is contained in:
parent
d305de04de
commit
fdf381c8a5
@ -136,8 +136,17 @@ const videoPlayer = document.getElementById('video');
|
||||
|
||||
function time(seconds) {
|
||||
videoPlayer.currentTime = seconds;
|
||||
|
||||
// Add #video to the URL
|
||||
window.location.hash = 'top';
|
||||
|
||||
// Remove #video after a short delay
|
||||
setTimeout(() => {
|
||||
history.replaceState(null, null, ' ');
|
||||
}, 250);
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('click', function(event) {
|
||||
const clickedElement = event.target;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user