SHARE
TWEET

Untitled

a guest Dec 16th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var windowInnerHeight=0;
  2. var windowInnerWIdth=0;
  3. function studycomfort_function_calculateWindowInnerWidthHeight()
  4. {
  5.  
  6.     var div=document.createElement("DIV");
  7.     div.style.position="absolute";
  8.     div.style.left="0px";
  9.     div.style.top="0px";
  10.     div.style.width="100vh";
  11.     div.style.height="100vh";
  12.     document.body.appendChild(div);
  13.     windowInnerHeight=div.getBoundingClientRect().bottom;
  14.     windowInnerWidth=div.getBoundingClientRect().right;
  15.     document.body.removeChild(div);
  16.     return;
  17.  
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top