Created
March 7, 2011 01:32
-
-
Save ericclemmons/857947 to your computer and use it in GitHub Desktop.
Example recipe for adding "infinite scroll" to Hackernews
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
// README: https://github.com/ericclemmons/de-pagify | |
// | |
// Step 0 - Visit http://news.ycombinator.com/ | |
// Step 1 - Inject jQuery (http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet) | |
// Step 2 - Inject De-Pagify (https://github.com/ericclemmons/de-pagify/raw/master/bookmarklet.jquery.min.js) | |
// Step 3 - Run the following in the console: | |
jQuery('td > table:eq(1)').depagify('td.title:last a', { | |
filter: 'tr', | |
threshold: 'td.title:last a', | |
effect: function() { | |
jQuery(this).fadeIn(); | |
}, | |
events: { | |
request: function() { | |
jQuery('tr:last', this).remove(); | |
} | |
} | |
}); | |
// Step 4 - Now scroll down to the "More" link for content to automatically load! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment