Skip to content

Instantly share code, notes, and snippets.

@RyanBreaker
Last active August 29, 2015 14:22
Show Gist options
  • Save RyanBreaker/24eae2e4a48a2f921f28 to your computer and use it in GitHub Desktop.
Save RyanBreaker/24eae2e4a48a2f921f28 to your computer and use it in GitHub Desktop.
if(window.scrollMaxY === null) {
Object.defineProperty(window, 'scrollMaxY', {
get: function() { return document.documentElement.scrollHeight - document.documentElement.clientHeight; }
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment