// DeviantART - FullViewer v0.1
// Made By Luke Stevenson {http://lucanos.deviantart.com/}
// Distributed and Maintained via GMVC
// Last updated: 05 August 2005
//
//   This script modifies all links to "*/deviation/*" pages to point to
// the corresponding "*/view/*" page.  This means the links jump straight
// to Full View as opposed to going through the Standard View page first.
//
// ==UserScript==
// @name              DeviantART - FullViewer
// @namespace         http://gmvc.lucanos.com/
// @description       (v0.1) Makes all links which refer to "*/deviation/*" refer to "*/view/*".
// @include           http://deviantart.com*
// @include           http://*.deviantart.com*
// ==/UserScript==

(function () {

	var viewRegExp = /http\:\/\/www\.deviantart\.com\/deviation\/([0-9]{1,})\/$/ig;

	for ( a = 0 ; a < document.links.length ; a++ ) {
		var match = viewRegExp.exec(document.links[a].href);
		if ( match ) {
			document.links[a].href = "http://www.deviantart.com/view/"+match[1]+"/";
			document.links[a].title = document.links[a].href;
		}
	}

})();
