diff --git a/www/js/my.js b/www/js/my.js index ec2e8aa36c..e6cc849c28 100644 --- a/www/js/my.js +++ b/www/js/my.js @@ -387,6 +387,20 @@ function selectTheme(theme) location.href = location.href; } +/** + * Get the screen size and save to cookie. + * + * @access public + * @return void + */ +function saveScreenSize() +{ + width = $(window).width(); + height = $(window).height(); + $.cookie('winWidth', width) + $.cookie('winHeight', height) +} + /** * Set the about link. * @@ -686,10 +700,11 @@ $(document).ready(function() setAbout(); saveProduct(); saveProject(); - if(needPing) setTimeout('setPing()', 1000 * 60 * 5); // After 5 minus, begin ping. setForm(); autoCheck(); togglesearch(); + saveScreenSize(); + if(needPing) setTimeout('setPing()', 1000 * 60 * 5); // After 5 minutes, begin ping. }); /* CTRL+g, auto focus on the search box. */