// ==UserScript==
// @name          Slashdot - restore old user pages
// @namespace     http://nullprogram.com
// @description   Restore user links to users.pl
// @version       0.0.1
// @copyright     2009, Christopher Wellons (http://nullprogram.com)
// @license       ISC license; http://isc.org/software/license;
// @include       http://slashdot.org/*
// @include       http://*.slashdot.org/*
// ==/UserScript==

var links = document.getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {
    var link = links[i];
    if (link.href.search(/\/\/([a-z]+\.)?slashdot.org\/~[^/]+\/?$/) != -1) {
	var uid = link.innerHTML.match(/\((\d+)\)/);
	if (uid)
	    link.href = "http://slashdot.org/users.pl?uid=" + uid[1];
	else
	    link.href = "http://slashdot.org/users.pl";
    }
}
