Results 1 to 6 of 6
  1. #1
    Network Hub bonuswavepilot's Avatar
    Join Date
    Jun 2011
    Location
    Melbourne, Australia
    Posts
    166

    A pagination removal greasemonkey script

    Hey RPSers.

    I have hacked together a simple greasemonkey script to convert paginated articles into one long one instead. I call it "Don't Page Me, Bro!".

    Note that since the secondary pages are actually on separate web pages, it will take a few seconds to go fetch the other content.

    I have only tested it with a couple of such articles, so if you run into problems, let me know and I'll try to bug-fix.

    It should remove extraneous bylines and sharing buttons from the content that gets grabbed from other pages, though it will not try to remove 'continued on page x' type text.

    It may be found here.

    Technical info
    The script first harvests page links from the buttons in the 'pagination' div at the bottom of the first page of content. It will then grab the contents of those pages via AJAX calls, and append the contents of each 'entry' div to the bottom of this page's 'entry' div.

    Once this is done for all pages, it will run through and hide the pagination divs, any byline divs other than the first, and any social button divs other than the first and last.

    Notes:
    - Replying to an article will work, but when it reloads the page you will not end up looking at your own comment. (This is because while the site will initially load with your new comment in view, adding the extra page content will push it off screen again)
    Last edited by bonuswavepilot; 30-04-2015 at 06:08 AM.

  2. #2
    Secondary Hivemind Nexus somini's Avatar
    Join Date
    Jun 2011
    Location
    NEuro Troika Franchulate #3
    Posts
    4,906
    Thanks!

    Is there any alternative to that awesome Firefox plugin called AutoPager? It has fallen into disrepair, the newer versions just broke most of the stuff, but that was a generic version of this kind of thing.
    Steam(shots), Imgur, Flickr, Bak'laag, why do you forsake me?

  3. #3
    Network Hub bonuswavepilot's Avatar
    Join Date
    Jun 2011
    Location
    Melbourne, Australia
    Posts
    166
    Can't say I'm familiar with that plugin...

    Would seem tricky to make such a thing generic, given how many different ways paging could be implemented - although I suppose you could at least account for popular frameworks or libraries. Bit outside my bailiwick anyway I'm afraid - greasemonkey scripts just require some javascript, Firefox plugins would require a bit more research.

  4. #4
    Secondary Hivemind Nexus somini's Avatar
    Join Date
    Jun 2011
    Location
    NEuro Troika Franchulate #3
    Posts
    4,906
    Quote Originally Posted by bonuswavepilot View Post
    greasemonkey scripts just require some javascript, Firefox plugins would require a bit more research.
    The newer API are basically JS that runs with elevated privileges. There's something called Jetpack or something.
    Anyway, that's just wishful thinking.
    Steam(shots), Imgur, Flickr, Bak'laag, why do you forsake me?

  5. #5
    There are times that a firefox will suddenly crashed. Do you have any idea with this?

  6. #6
    Network Hub bonuswavepilot's Avatar
    Join Date
    Jun 2011
    Location
    Melbourne, Australia
    Posts
    166
    Erm I don't think this script is likely to cause crashes - it might use up a bit of memory on one of those articles with lots of pages, but only as much as having a few pages open in tabs; shouldn't be enough to be crashing anything. I suppose it's possible that there is a problem with the greasemonkey plugin itself?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •