Skip til indhold
- Hvis du vælger et valg, opdateres hele siden.
const repositionPage = () => {
let pageVerticalPosition = localStorage.getItem('pageVerticalPosition');
if(pageVerticalPosition){
window.scrollTo(0, pageVerticalPosition);
localStorage.removeItem("pageVerticalPosition");
} }
window.addEventListener('globoFilterRenderCompleted', repositionPage);
const beforeUnloadListener = (event) => {
localStorage.setItem('pageVerticalPosition', window.scrollY);
};
addEventListener('pagehide', beforeUnloadListener, { capture: true });