// ==UserScript==
// @name           UnlockXss
// @namespace      net.marciowb.unlock.xss
// @include        http://127.0.0.1:8080/
// @include        http://www.trilha21.com.br/
// ==/UserScript==

unsafeWindow.xss = {};
unsafeWindow.xss._requests = new Array();
unsafeWindow.GM_xmlhttpRequest = unsafeWindow.xss;

unsafeWindow.xss.call = function(req) {
	unsafeWindow.xss._requests.push(req);
	window.setTimeout( xssExecutor, 1 );
};

function _xssExecutor() {
	var reqs = unsafeWindow.xss._requests;
	if (reqs.length<1)
		return;
			
	var req = reqs[reqs.length-1];
	reqs.pop();
	
	GM_xmlhttpRequest(req);
}

function xssExecutor() {
	try {
		_xssExecutor();
	} catch (ex) {
		GM_log(ex);
	}	
}


