Soup-Pager

By Florian 3 Last update Aug 29, 2008 — Installed 53 times. Daily Installs: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 3, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0

There are 1 previous version of this script.

// ==UserScript==
// @name           Soup-Pager
// @namespace      http://alphabeter.at/greasemonkey
// @description    Adds a link to the next page - just in case endless scrolling fails again. Or you want to continue permascrolling the next day, and don't want to see everyhing again. Or just hate Ajax-User-Interface-Anti-Feeling.
// @include        http://*.soup.io/*
// @include        http://soup.io/*
// ==/UserScript==

addEventListener('load', function(event) {	
	
	content_div=document.getElementById("more_history");	
	content_div.addEventListener ("DOMNodeInserted", insert, false);

		
	function insert() {

		content_div.removeEventListener ("DOMNodeInserted", insert, false);
		new_div = document.createElement("div");
		new_div.innerHTML = '<p style="text-align:right;width:100%"><a href="'+unsafeWindow.SOUP.Endless.next_url+'">Permalink to next page</a></p>';				
		content_div.insertBefore(new_div,content_div.lastChild);
		content_div.addEventListener ("DOMNodeInserted", insert, false);
	}
	
}, false);