// ==UserScript==
// @name Next-userfriendly: Enables FF on User Friendly
// @author Jordi Kroon 
// @namespace http://members.chello.nl/b.kroonspecker/opera/ 
// @version 1.0
// @description  Adds a next <link> tag for the "next" links at User Friendly
// ==/UserScript==

/* 
 * this script is licensed under CC-BY-NL 2.0:
 * http://creativecommons.org/licenses/by/2.0/nl/
 */

document.addEventListener('load',function(){
  if(location.hostname.match(/^ars.userfriendly.org$/)){
  var i=0, ar, ars=document.getElementsByTagName('area');
  while(ar=ars.item(i++)){
	if (!(ar.getAttribute('alt'))) {
	  var head = document.getElementsByTagName('head')[0];
	  var next = document.createElement('link');
	  next.setAttribute('rel', 'next');
	  next.setAttribute('href', ar.getAttribute('href'));
	  head.appendChild(next);
	  return; //to keep from adding multiple links
	}
  }}
},false);

