add: base=base.replace(/.*(#[c|t][0-9]+)$/i,''); 
context: function RTSE_postPermalink(aDoc)// EFFECTS: Adds a permalink to posts on a page in aDoc{	try {		var elms=RTSE_evaluateXPath(aDoc,"//td[@id='pageContent']/table/tbody/tr[2]/td/table/tbody/tr[3]/td/table/tbody/tr/td/table/tbody/tr/td[2]/table/tbody/tr[1]/td[1]");		var a,text,num;		var base=(new String(aDoc.location.href)).replace(/.*\/forum\/viewTopic\.php\?id=([0-9]+)$/i,'/forum/viewTopic.php?id=$1');		for( var i in elms ) {			text=elms[i].firstChild.data;			a=aDoc.createElement('a');			a.setAttribute('title','Permalink');			text=text.replace(/(\n|\t)/gmi,'');			num=text.replace(/^.*#([0-9]+).*$/i,'$1');			a.setAttribute('href',base+'#t'+num);			a.appendChild(aDoc.createTextNode('#'+num));			text=' '+text.replace(/^#[0-9]+(.*?)$/,'$1');			elms[i].replaceChild(aDoc.createTextNode(text),elms[i].firstChild);			elms[i].insertBefore(a,elms[i].firstChild);		}	} catch(e) {		gRTSE.sendReport(e);	}}
meta: 760	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/760/3a6e85b24db1122ed15d6bcb99d5606b455496f2/pageFix.js/clean/chrome/content/pageFix.js