diff --git a/css/app.js b/css/app.js index 17a0123f..f2651a26 100644 --- a/css/app.js +++ b/css/app.js @@ -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;