1/* fit the window size to match the content wrapper */
2function fitWindow2Content( contentWrapper ) {
3
4 // calculate necessary change in window's width
5 var width = window.innerWidth - contentWrapper.clientWidth;
6
7 // calculate necessary change in window's height
8 var height = window.innerHeight- contentWrapper.clientHeight;
9
10 // resize window to fit content
11 window.resizeBy( -width , -height );
12
13}