site/includes/modules.js
/**
 * Calculates the width of the scrollbar, depending on the client width.
 */
Calculates the width of the scrollbar, depending on the client width.
Calculates the width of the scrollbar depending on the client width .
function updateScrollbar() {
  const clientWidth = document.documentElement.clientWidth
  const scrollbar = Math.abs(window.screen.width - clientWidth) <= 1 ? 0 : window.innerWidth - clientWidth;
  document.documentElement.style.setProperty("--scrollbar-width", scrollbar + "px");
}
function updateScrollbar ( ) { const clientWidth = document . documentElement . clientWidth const scrollbar = Math . abs ( window . screen . width - clientWidth ) <= 1 ? 0 : window . innerWidth - clientWidth ; document . documentElement . style . setProperty ( "--scrollbar-width" , scrollbar + "px" ) ; }
Calculates the width of the scrollbar, depending on the client width.
Calculates the width of the scrollbar depending on the client width .