$(window).height() used to return the height of the browser viewport window, and $(window).width() was used for browser window width.
$(window).height() now just returns the same value as $(document).height(), i.e. the height of the whole page.
What is a proper way to acquire viewport sizes now in jquery?