1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 02:34:38 -05:00

add jump to time v2

This commit is contained in:
Ashley //// 2024-04-11 08:26:47 +00:00
parent d305de04de
commit fdf381c8a5

View file

@ -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;