mirror of
https://github.com/gitpitch/gitpitch.git
synced 2024-04-18 07:30:55 +08:00
1 line
789 B
JavaScript
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"); |