remove IE6 support
This commit is contained in:
parent
4d3f1f99aa
commit
9937900e91
19
js/modal.js
19
js/modal.js
@ -25,21 +25,4 @@ function createModal(text,renderAsHTML=false) {
|
|||||||
document.getElementById("modal-text-div").innerText = text
|
document.getElementById("modal-text-div").innerText = text
|
||||||
}
|
}
|
||||||
currentModal.style.display = shade.style.display = "block"
|
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();
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user