Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Unpaginate pagination microformated web pages

Unpaginates pages marked-up with the pagination microformat. (microformat consumer)

This script will unpaginate any web pages augmented by the pagination microformat, into what traditionally (if somewhat incorrectly) has been called "endless" Google, Flickr, and similar, pages. In other words, a hack that loads the next page into the present one when you scroll within about half a screenful of the end, so you don't have to lose the pageful you have to load the next pageful -- it just gets inlined for you, instead.

By itself, this script will do nothing at all, because it only contains the code that implements this unpagination; tailoring it to other sites is up to other, much, much smaller custom scripts anyone can write -- or indeed site authors may augment their site templates with, for the benefit of their visitors running this hack, should they want to.

So, what does this microformat look like? It consists of:

  • A <link rel="next"> tag with a href attribute pointing to the next page.
  • Three <meta name="..." content="xpath expression"> tags:
    name="items-xpath"
    An XPath expression that matches all items to slice out of each page.
    name="pagination-container" (optional)
    For pages that have a pagination list that you want to update when loading each new subpage into the present, this XPath expression locates that in the page.
    name="next" (optional on sites where all pages are served from the same domain)
    An XPath expression that resolves to the next link of the present page.

For examples of microformat producers for this script, see the source for the Google search results, Flickr photo comments and OkCupid journals (the latter works with presently released pre-0.8 Greasemonkey installations) handlers.




Jun 25, 2008
Johan Sundström Script's author

Fun, isn't it? :-)

 
Jun 23, 2008
gollum Scriptwright

Also - couldn't help myself - one for 'userscripts.org/scripts' http://userscripts.org/scripts/show/28968

 
Jun 13, 2008
gollum Scriptwright
Hi Johan, have created a producer for phpbbV2 sites - at least it works on http://www.ibdof.com/viewtopic.php?t=650

Unpaginate phpbbV2 threads

 
May 16, 2008
Johan Sundström Script's author

Aquilax: if you haven't already, feel free to copy and edit this script to do what you like. You won't have to change the microformat producers, and if you want your custom behavious only on a few sites, you can regulate that with the @include and @exclude patterns. Good luck!

 
Mar 22, 2008
Aquilax Scriptwright

Hi Sundström, I was thinking that it would be nice to have an "event" to change each result in the page. What I'm trying to say is that it would be useful to have a way to register a function that will be called for all the original results in the page and for all the new added results.
I'm using the Pagerization script and I find very nice how it change the results on the google.com/images.
I'm using your script to unpaginate some photo albums and with such a function I would be able to add a mouseover event and show the picture in a float div and not have to load them each time in separate page to look at them.

 
Feb 28, 2008
Aquilax Scriptwright

OK, it was my fault, I removed the "pagination-container" and now it works fine. Great work. But I think that it has some problem to detect the scroll to the end of the page, sometimes I have to scroll twice o three time before it load the next page.

 
Feb 28, 2008
Aquilax Scriptwright

Ok I've "cloned" the "OkCupid journals" scripts, it works, but instead of append the next page it replace the actual page. The layout of the page is a table with 4 rows and each rows has 4 cells, for a total of 16 pictures per page.
I set the "pagination-container" to the table body of the table and the "items-xpath" to the table rows.
The results is that each 4 seconds it loads the next page and replaces the content of the table body with that of the next page instead of adding it at the bottom of it.

 
Feb 28, 2008
Aquilax Scriptwright

Uhm I'm danger adverse, some times, I have a lot of micro scripts that I have done only for myself and I don't think that they would be interesting for any one else so I never uploaded them on userscripts.org. One of them would have used your microformated script, I wanted to add the "endless page" effect to a pictures collection page. I tried to copy your yahoo script but it didn't work, which is the only one script that works with GM 0.7? So I can copy that script and try to adapt it.

 
Feb 28, 2008
Johan Sundström Script's author

My remotely hosted version (small link below the install link) is 0.8 only, though, but sports a live editor for microformat producers, for advanced xpath wranglers, which you activate by running the bookmarklet javascript:void(craft()) (be sure to be logged in on userscripts.org too, or I assume their token verification for uploading scripts will fail).

(You also might want to change namespace from what I put in mine before you post.)

 
Feb 28, 2008
Johan Sundström Script's author

The version installable here works without 0.8, but all but one of its microformat producers (that I've made, that is) don't.

<Beware!>

The development build I run at the moment is here, but it is potentially dangerous and untested in the large; it may quite possibly wipe your entire list of GM scripts, so be sure to backup if you consider running it (we have fixed/regressed that symptom three times already, so it could be there still, or again).

</Beware!>

(Also, I could be a shady guy linking a malware infested xpi; there are lots of good reasons to wait for a real 0.8 once available.)

 
Feb 28, 2008
Aquilax Scriptwright

Interesting but without greasemnkey 0.8 doesn't work. Where is possible to download and install the pre-release version?

 
Feb 25, 2008
Johan Sundström Script's author

I wrote up a blog post about the technical stigmergy / ecology / microformat aspects of this script and its many companions that is probably of interest to fellow scriptwrights wanting to extend this hack to other sites or consume the same data it does. Click the "pagination microformat" tag on the right to find them all.

You could comment on this script if you were logged in.