video elements shift fix

This commit is contained in:
aneuhmanh 2025-04-08 14:15:26 +03:00
parent f7d99ee5fc
commit c9b4ec26fd

View File

@ -0,0 +1,8 @@
document.addEventListener("DOMContentLoaded", () => {
const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
document.body.style.paddingRight = `${scrollbarWidth}px`;
const navbarHeight = document.querySelector('.navbar').offsetHeight;
document.documentElement.style.scrollPaddingTop = `${navbarHeight}px`;
});