Anonymous

MediaWiki:Common.js: Difference between revisions

From Melvor Idle
no edit summary
(Try another event listener)
No edit summary
Line 576: Line 576:
// Reset sticky header positions once the page is fully loaded.
// Reset sticky header positions once the page is fully loaded.
// Without this, headers may have an incorrect offset
// Without this, headers may have an incorrect offset
document.addEventListener('readystatechange', function(event) {
window.onload = function() { setStickyHeaderTop(); };
if (document.readyState === 'complete') {
setStickyHeaderTop();
}
});
}
}
});
});