X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-propro;a=blobdiff_plain;f=html%2Fresize.js;fp=html%2Fresize.js;h=a80decef3f865269b74a816079af40b0b0ba1f7f;hp=2bb9169002841a4d6d5e22b70dac9124f1385f60;hb=9155673850189951e27e188f2003ba68d8ea2c67;hpb=36da2074d28309d1704b47e121f432fcdaf8a245 diff --git a/html/resize.js b/html/resize.js index 2bb9169..a80dece 100644 --- a/html/resize.js +++ b/html/resize.js @@ -1,17 +1,17 @@ -var cookie_namespace = 'doxygen'; +var cookie_namespace = 'doxygen'; var sidenav,navtree,content,header; -function readCookie(cookie) +function readCookie(cookie) { var myCookie = cookie_namespace+"_"+cookie+"="; - if (document.cookie) + if (document.cookie) { var index = document.cookie.indexOf(myCookie); - if (index != -1) + if (index != -1) { var valStart = index + myCookie.length; var valEnd = document.cookie.indexOf(";", valStart); - if (valEnd == -1) + if (valEnd == -1) { valEnd = document.cookie.length; } @@ -22,10 +22,10 @@ function readCookie(cookie) return 0; } -function writeCookie(cookie, val, expiration) +function writeCookie(cookie, val, expiration) { if (val==undefined) return; - if (expiration == null) + if (expiration == null) { var date = new Date(); date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week @@ -33,12 +33,12 @@ function writeCookie(cookie, val, expiration) } document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; } - -function resizeWidth() + +function resizeWidth() { var windowWidth = $(window).width() + "px"; var sidenavWidth = $(sidenav).outerWidth(); - content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); writeCookie('width',sidenavWidth, null); } @@ -49,7 +49,7 @@ function restoreWidth(navWidth) sidenav.css({width:navWidth + "px"}); } -function resizeHeight() +function resizeHeight() { var headerHeight = header.outerHeight(); var footerHeight = footer.outerHeight(); @@ -89,3 +89,5 @@ function initResizable() } }); } + +