// ==UserScript==
// @name deviantart.com - Skip deviation
// @author Scipio 
// @namespace http://home.wanadoo.nl/sipke.reina/opera/index.html 
// @version 1.0
// @description  Bypasses the preview page for artworks on the
//			deviantART site.
// @ujs:category site: enhancements
// @ujs:published 2005-10-25 22:27
// @ujs:modified 2005-10-25 22:57
// @ujs:documentation http://userjs.org/scripts/site/enhancements/deviantart-skip-deviation 
// @ujs:download http://userjs.org/scripts/download/site/enhancements/deviantart-skip-deviation.js
// ==/UserScript==


/* 
 * This script is granted to the Public Domain.
 */

if (window.location.href.match(/^http:\/\/\w+\.deviantart\.com/)){

	window.opera.addEventListener(
		'AfterEventListener.load',

		function(){
			for(var  i = 0, j; j = document.links[i]; i++){
				if (j.href.match(/^http:\/\/www\.deviantart\.com\/deviation\/\d+\//) && j.innerHTML.indexOf('Zoom Out')==-1) 
					j.href=j.href.replace('deviation','view');
			}
		},
        	false);
}
