add:  function RTSE_deconvertExtraBB(aDoc)   { var form = aDoc.forms.namedItem('post');  var body = form.elements.namedItem('body'); if (!body) return;  body.value = body.value.replace(/\[b\]Quoting ([a-zA-Z0-9_]{4,12}):\[\/b\]\[quote\]([\s\S]+)\[\/quote\]/g,'[quote=$1]$2[/quote]');   if( body.value.match(/\[i\]In reply to [a-zA-Z0-9_]{4,12}, \[link=.*?#t[0-9]+\]\[i\]#[0-9]+\[\/i\]\[\/link\]:\[\/i\]/g) ) {  var path = body.value.replace(/^[\s\S]*\[i\]In reply to ([a-zA-Z0-9_]{4,12}), \[link=(.*?)#t[0-9]+\]\[i\](#[0-9]+)\[\/i\]\[\/link\]:\[\/i\][\s\S]*$/i, '$2'); var elm = aDoc.createElement('input'); elm.value = path; elm.id = 'rtseLocation'; elm.setAttribute('type','hidden'); form.appendChild(elm);  body.value = body.value.replace(/\[i\]In reply to ([a-zA-Z0-9_]{4,12}), \[link=.*?#t[0-9]+\]\[i\](#[0-9]+)\[\/i\]\[\/link\]:\[\/i\]/g, '[i]In reply to $1, $2:[/i]'); } }  function RTSE_HTMLtoBB(aText)  {  aText = aText.replace(/<a href=".*?"><i>#([0-9]+)<\/i><\/a>/g,'#$1');  aText = aText.replace(/<(b|i|u)>/g,'[$1]'); aText = aText.replace(/<\/(b|i|u)>/g,'[/$1]'); aText = aText.replace(/<del>/g,'[s]'); aText = aText.replace(/<\/del>/g,'[/s]'); aText = aText.replace(/<a href="([^" \t\n<>]+)" target="_blank">/g,'[link=$1]'); aText = aText.replace(/<a href="(\/[^" \t\n<>]+)">/g,'[link=$1]'); aText = aText.replace(/<\/a>/g,'[/link]');  aText = aText.replace(/<img .*?src="\/(.*?)".*?>/g,'[img]http: aText = aText.replace(/<img.*? src="(.*?)".*?>/g,'[img]$1[/img]'); aText = aText.replace(/<br><br><span class="small"(.*?)>(.*?)<\/span>/g,''); aText = aText.replace(/<blockquote(.*?)>(.*?)<\/blockquote>/g,''); aText = aText.replace(/\t/g,''); aText = aText.replace(/\n/g,''); aText = aText.replace(/<br>/g,'\n');   if (gRTSE.prefsGetBool('extensions.rtse.sponsor')) { aText = aText.replace(/<span style="color: (.*?);">/g,'[color=$1]'); aText = aText.replace(/<\/span>/g,'[/color]'); } else { aText = aText.replace(/<span style="color:.*?">/g,''); aText = aText.replace(/<\/span>/g,''); }   aText = aText.replace(/&amp;/g,'&'); aText = aText.replace(/&lt;/g,'<'); aText = aText.replace(/&gt;/g,'>');  return aText; } 
context: function RTSE_convertExtraBB(aEvent)// EFFECTS: converts to the site BBcode.  Takes an element in the parent document.//          Looks for rtseLocation for a path for any 'in reply to...' sections.{	var doc = aEvent.originalTarget.ownerDocument;	var body = doc.forms.namedItem('post').elements.namedItem('body');		body.value = body.value.replace(/\[quote=([a-zA-Z0-9_]{4,12})\]([\s\S]+)\[\/quote\]/g,'[b]Quoting $1:[/b][quote]$2[/quote]');	var loc;	if( doc.getElementById('rtseLocation') ) {		loc = doc.getElementById('rtseLocation').value;	} else {		loc = doc.location.href.replace(/^https?:\/\/(www|sh|rvb|panics)\.roosterteeth\.com(.*)$/i,'$2');		loc = loc.replace(/#[a-z0-9]+/i,''); // clears any anchors	}	loc = loc.replace(/&page=[0-9]+/i,''); // clears any currently set page	var post,page;	while( body.value.match(/\[i\]In reply to [a-zA-Z0-9_]{4,12}, #[0-9]+:\[\/i\]/i) ) {		post = body.value.replace(/^[\s\S]*\[i\]In reply to [a-zA-Z0-9_]{4,12}, #([0-9]+):\[\/i\][\s\S]*/i,'$1');		page = (loc=='')?'':'&page='+Math.ceil(post/30);		body.value = body.value.replace(/\[i\]In reply to ([a-zA-Z0-9_]{4,12}), #([0-9]+):\[\/i\]/i,		                                '[i]In reply to $1, [link='+loc+page+'#t$2][i]#$2[/i][/link]:[/i]');	}}
meta: 760	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/760/4fdcae3c7afa55c7bcb66dee40f5b729bafef8bb/pageFix.js/buggy/chrome/content/pageFix.js