gitpitch/public/libs/js/adjuster.js
2016-08-27 09:49:46 +07:00

1 line
789 B
JavaScript

function windowDimensions(){var e=0,n=0;return"number"==typeof window.innerWidth?(e=window.innerWidth,n=window.innerHeight):document.documentElement&&document.documentElement.clientWidth||document.documentElement.clientHeight?(e=document.documentElement.clientWidth,n=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(e=document.body.clientWidth,n=document.body.clientHeight),e<1&&(e=screen.width),n<1&&(n=screen.height),[e,n]}$(window).resize(function(){var e=windowDimensions();mainframe=$("#slideshow"),0==mainframe.length&&(mainframe=$("#messagebox")),mainframe.height(e[1]-140+"px")});var dim=windowDimensions(),mainframe=$("#slideshow");0==mainframe.length&&(mainframe=$("#messagebox")),mainframe.height(dim[1]-140+"px");