Created
May 16, 2014 19:09
-
-
Save jedahan/d0686225e397767a9e91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var addMore = function(ev) { | |
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) { | |
// you're at the bottom of the page | |
var div = document.createElement('div') | |
div.setAttribute("style", "font-family: sans-serif; font-size: 500%;") | |
div.innerHTML = "POLARIZING. MERCURIAL. FORCEFUL. FEARELESS. TALENTED. STUBBORN. CONDESCENDING. DIFFICULT. UNREASONABLE. IMPOSSIBLE. DISENGAGED. UNCARING. UNPOPULAR. PUSHY. HARD. BRUSQUE." | |
document.body.appendChild(div) | |
} | |
} | |
window.onscroll = addMore; | |
addMore(); // Run this function a few times at the beginning, then firefox is happy | |
addMore(); // This is a hack, basically window.onscroll will not fire unless you scroll | |
addMore(); // But if the page isn't long enough for scrolling to be necessary, you cannot scroll! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment