Results 1 to 10 of 10
30-04-2015, 05:30 AM #1
A pagination removal greasemonkey script
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.
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.
- 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.
30-04-2015, 11:47 PM #2
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.
01-05-2015, 05:46 AM #3
Can't say I'm familiar with that plugin...
03-05-2015, 07:32 PM #4
16-05-2015, 08:17 AM #5
There are times that a firefox will suddenly crashed. Do you have any idea with this?
16-05-2015, 08:31 AM #6
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?
19-06-2015, 12:18 AM #7
19-06-2015, 12:57 AM #8
Chrome/nu-Opera/General Webkit nonsense:
Just remeber, with great power comes great responsibility, don't go installing random scripts from any site.
for a repository, but you should read the code (if you can) to see if it's not doing somehting evil.
21-06-2015, 07:53 AM #9
In the case of this script, I have described in the OP what the code does, but as somini suggests, it is always a good idea to read through it if you can. (Some effort has been put into trying to make greasemonkey secure by sandboxing etc, but there is always another bug to be exploited.)
21-06-2015, 10:39 AM #10
The "@include" and "@exclude" lines tell you in what pages the script will run, if you spot stuff like "@include *" or unrelated URL you should dig deeper.
The "@grant" lines let the script do more powerful things, which might lead to evil credential stealing. Most scripts only need "@grant none", unless they are very complex (or whoever wrote them is a lousy programmer :D). Note that the credential stealing thing is still possible with no grants.