remove IE6 support

This commit is contained in:
Mystikfluu 2023-02-10 16:04:24 +01:00
parent 4d3f1f99aa
commit 9937900e91

View File

@ -26,20 +26,3 @@ function createModal(text,renderAsHTML=false) {
}
currentModal.style.display = shade.style.display = "block"
}
// This code is a workaround for IE6's lack of support for the
// position: fixed style.
//
if (!('maxHeight' in document.body.style)) {
function modalsize() {
const top = document.documentElement.scrollTop;
const winsize = document.documentElement.offsetHeight;
const docsize = document.documentElement.scrollHeight;
shade.style.height = Math.max(winsize, docsize) + 'px';
modal.style.top = top + Math.floor(winsize / 3) + 'px';
};
modal.style.position = shade.style.position = 'absolute';
window.onscroll = window.onresize = modalsize;
modalsize();
}