Depaginate Phoronix Articles

I sketched this for Phoronix, but you could easily adapt it to any site that uses pagination. I think it’s an interesting problem, so if you want to see another site depaginated, just ask me in a comment and I’ll check it out.

Here’s the script. It’s also available as a Gist if you want to tinker with it.

/**
 * Depaginate Phoronix articles
 *
 * Script by Justin Force, 2012. Released to the public domain.
 *
 * Stick this in whatever user scripts you have. I keep an unpacked Chrome
 * extension. You could also use this with GreaseMonkey or something as long as
 * you load jQuery first.
 */


$(function () {
  $.each($('.phxcms_navigation_format a').filter(function () {
    return $(this).attr('href').match(/&num=/) && !$(this).text().match(/Next Page/);
  }), function () {
    var div = $('<div>');
    div.load($(this).attr('href') + ' #phxcms_content_phx', function () {
      div.find('.phxcms_navigation_format').remove();
    });
    $('#phxcms_content_phx').append(div);
  });
});
This entry was posted in javascript, quickies and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>