update modalsize function
"var" -> "const"
This commit is contained in:
parent
5e425c0fbc
commit
efcded8816
@ -33,9 +33,9 @@ function createModal(text,renderAsHTML=false) {
|
|||||||
//
|
//
|
||||||
if (!('maxHeight' in document.body.style)) {
|
if (!('maxHeight' in document.body.style)) {
|
||||||
function modalsize() {
|
function modalsize() {
|
||||||
var top = document.documentElement.scrollTop;
|
const top = document.documentElement.scrollTop;
|
||||||
var winsize = document.documentElement.offsetHeight;
|
const winsize = document.documentElement.offsetHeight;
|
||||||
var docsize = document.documentElement.scrollHeight;
|
const docsize = document.documentElement.scrollHeight;
|
||||||
shade.style.height = Math.max(winsize, docsize) + 'px';
|
shade.style.height = Math.max(winsize, docsize) + 'px';
|
||||||
modal.style.top = top + Math.floor(winsize / 3) + 'px';
|
modal.style.top = top + Math.floor(winsize / 3) + 'px';
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user