// ==UserScript==
// @name           The Userscripts Optimizer
// @namespace      Userscript_Optimizer
// @description    Optimize userscripts code for faster working
// @include        *userjs*
// @include        *userscripts*
// @include        *iescripts*
// @include        *http://operafan.net/component/option,com_remository/Itemid,72/func,select/id,16/*
// @author         KOLANICH
// @copyright      KOLANICH,2010
// @version        0.9
// @uso:rating     10
// @optimize       2
// ==/UserScript==
/*Changes links to userscripts into links to encoded scripts*/

/*var uri=window.location.href;
window.location.href="http://kolanich.x10hosting.com/userjsencode.php?uri="+uri;*/
var elements = (document.querySelectorAll ? document.querySelectorAll('a[href]') : document.getElementsByTagName('A'));
var rx=/^(IE7Pro|http|https)\:\/\/([\w-]+(:[\w-]+)?@)?[\w\.%-]+(:\d+)?[\w\/\.%\?=&-]+.user.js/i,i;
var sch;
for(i=0; i<elements.length; i++){
	if(sch=rx.test(elements[i].href)){
		var uri=elements[i].href;
		elements[i].href="IE7Pro://kolanich.x10hosting.com/userjsoptimize?uri="+uri;
		
	}
}
