Redirect multi-page news articles to a single page view using Greasemonkey

A lot of news websites split their articles into multiple pages. In theory this drives page impressions and thus ad revenue. In practice it is just annoying. The Greasemonkey script below automagically redirects you to a news article’s full page (in this case on zeit.de). It uses a MutiationObserver to wait for the pager UI element. The script kicks in once it appears – no need to wait until their page (or ads?!) have been fully loaded. 🙂

You can easily modify it:

1. Include all pages that might contain a multi-page article
2. Exclude all pages that might lead to a loop (especially the target site) or that will not contain a pager element (MutiationObserver can easily add a couple of milliseconds of loading time on complex pages)
3. Change the class name of the pager element to the one used by your site
4. Change the target location to the one you want to be redirect to

 

Ready-to-install scripts for:

golem.de
heise.de
zeit.de

2 Replies to “Redirect multi-page news articles to a single page view using Greasemonkey”

  1. Most recent changes for Heise:

    var pager = document.getElementsByClassName(‘pagination-all-on-one-page__link’);
    if (pager.length > 0) {

    window.location.replace(window.location.href + ‘?seite=all’);
    mutationObserver.disconnect();
    return;
    }

Leave a Reply

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