mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-13 01:38:03 +01:00
add jump to time v2
This commit is contained in:
parent
d305de04de
commit
fdf381c8a5
1 changed files with 9 additions and 0 deletions
|
@ -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 a new issue