Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var windowInnerHeight=0;
- var windowInnerWIdth=0;
- function studycomfort_function_calculateWindowInnerWidthHeight()
- {
- var div=document.createElement("DIV");
- div.style.position="absolute";
- div.style.left="0px";
- div.style.top="0px";
- div.style.width="100vh";
- div.style.height="100vh";
- document.body.appendChild(div);
- windowInnerHeight=div.getBoundingClientRect().bottom;
- windowInnerWidth=div.getBoundingClientRect().right;
- document.body.removeChild(div);
- return;
- }
Add Comment
Please, Sign In to add comment