site update v1.1

I discovered a bug while playing a video clip in my works gallery section. When I tried to close or escape the page during playback, the video continued running in the background. I immediately asked ChatGPT for a solution, got a script, and just like that—the bug was fixed!

// STOP VIDEO WHEN OVERLAY CLOSES

/* For Self hosted clip */

function stopMedia() {
overlay.querySelectorAll("video")
.forEach(video => {
video.pause();
video.currentTime = 0;
});

/* Fore embeded Youtube */

overlay.querySelectorAll("iframe")
.forEach(frame => {
const src =
frame.getAttribute("src");
frame.setAttribute("src", src);
});
}