rem: function RTSE_linkFix(doc) { /* removes all targets from links to RT sites and makes it go to your own flavor */ try { var links=RTSE_evaluateXPath(doc.getElementById('pageContent'),' var regEx=/^http:\/\/(www|rvb|sh|panics).roosterteeth.com(.*)$/i; for( var i=(links.length-1); i>=0; i-- ) { if( links[i].href.match(regEx) ) { links[i].removeAttribute('target');	/* Prevents new window */ links[i].href=links[i].href.replace(regEx,'$2'); } else if( links[i].href.match(/^\/(.*)$/i) ) { links[i].removeAttribute('target'); /* Prevents new window */ } } } catch(e) { gRTSE.sendReport(e); } 
add: function RTSE_linkFix(aDoc)    {  var loc = aDoc.location.href .replace(/^https?:\/\/(www|rvb|sh|panics)\.roosterteeth\.com(.*)$/i,'$2'); var func = function showMe(aEvent) { var id = this.href.replace(/^.*?#([\S\s]+)$/i,'$1'); var doc = this.ownerDocument; var elm = doc.getElementById(id) ? doc.getElementById(id) : doc.getElementsByName(id)[0]; if (elm) { elm.scrollIntoView(true); aEvent.preventDefault(); } }; var links = RTSE_evaluateXPath(aDoc," for (var i = (links.length - 1); i >= 0; --i) { links[i].addEventListener("click", func, false); }   if (!gRTSE.prefsGetBool("extensions.rtse.fixLinks")) return; links = RTSE_evaluateXPath(aDoc,' var regEx = /^http:\/\/(www|rvb|sh|panics).roosterteeth.com(.*)$/i; for (var i = (links.length - 1); i >= 0; --i) { if (links[i].href.match(regEx)) { links[i].removeAttribute('target'); links[i].href=links[i].href.replace(regEx, '$2'); } else if (links[i].href.match(/^\/(.*)$/i)) { links[i].removeAttribute('target'); } } 
context: function RTSE_linkFix(doc) {	/* removes all targets from links to RT sites and makes it go to your own flavor */	try {		var links=RTSE_evaluateXPath(doc.getElementById('pageContent'),'//a[@target="_blank"]');		var regEx=/^http:\/\/(www|rvb|sh|panics).roosterteeth.com(.*)$/i;		for( var i=(links.length-1); i>=0; i-- ) {			if( links[i].href.match(regEx) ) {				links[i].removeAttribute('target');	/* Prevents new window */				links[i].href=links[i].href.replace(regEx,'$2');			} else if( links[i].href.match(/^\/(.*)$/i) ) {				links[i].removeAttribute('target'); /* Prevents new window */			}		}	} catch(e) {		gRTSE.sendReport(e);	}}
meta: 760	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/760/37427066b97fc179ec9d51dfd34dbd84fa97feb4/pageFix.js/buggy/chrome/content/pageFix.js