add: diffButton = document.getElementById("wpDiff") diffButton.setAttribute("onclick","proofreadPageFillForm(this.form);");  
context: function proofreadpage_default_setup() {	var displayWidth = 400; //default value	if (parseInt(navigator.appVersion)>3) {		if (navigator.appName=="Netscape") {			displayWidth = parseInt(window.innerWidth/2-70);		}		if (navigator.appName.indexOf("Microsoft")!=-1) {			displayWidth = parseInt(document.body.offsetWidth/2-70);		}	}        image_url = proofreadpage_ImageUrl(displayWidth);	if(proofreadPageIsEdit) {		text = document.getElementById("wpTextbox1"); 		if (!text) return;		text.setAttribute("style", "width:100%; height:100%;");  //width seems to be set by monobook already...		re = /^(\{\{PageQuality\|[0-9][0-9]%\}\}|)<noinclude>([\s\S]*?)<\/noinclude>([\s\S]*)<noinclude>([\s\S]*?)<\/noinclude>\n$/;		m = text.value.match(re);		if(m) {			pageHeader = m[2];			pageBody   = m[1]+m[3];			pageFooter = m[4];		}		else {			re2 = /^(\{\{PageQuality\|[0-9][0-9]%\}\}|)<noinclude>([\s\S]*?)<\/noinclude>([\s\S]*?)\n$/;			m2 = text.value.match(re2);			if(m2) {				pageHeader = m2[2];				pageBody   = m2[1]+m2[3];				pageFooter = '';			}			else {				pageHeader = '';				pageBody = text.value;				pageFooter = '';			}		}	}	else { 		text = document.getElementById("bodyContent"); 		if(!text) return;	}	//image 	image = document.createElement("img");	image.setAttribute("src", image_url); 	image.setAttribute("style","padding:0;margin:0;border:0;");	//container	//useful for hooking elements to the image, eg href or zoom.	container = document.createElement("div");	container.setAttribute("id", "proofreadImage");	container.appendChild(image);	table = document.createElement("table");	table.setAttribute("id", "textBoxTable");	t_body = document.createElement("tbody");	t_row = document.createElement("tr");	t_row.setAttribute("valign","top");	cell_left = document.createElement("td");   	cell_left.setAttribute("width", "50%");	cell_left.setAttribute("style", "padding-right: 0.5em");	cell_right = document.createElement("td");   	cell_right.appendChild(container);	cell_right.setAttribute("valign","top");	cell_right.setAttribute("rowspan","3");	t_row.appendChild(cell_left);	t_row.appendChild(cell_right);	t_body.appendChild(t_row);	table.appendChild(t_body);	f = text.parentNode; 	new_text = f.removeChild(text);        	if(proofreadPageIsEdit) {		cell_left.innerHTML = ''			+'Header (noinclude):<br/>'			+'<textarea name="headerTextbox" rows="4" cols="80">'+pageHeader+'</textarea>'			+'<br/>Page body (to be transcluded):<br/>'			+'<textarea name="wpTextbox1" id="wpTextbox1" rows="40" cols="80">'+pageBody+'</textarea>'			+'<br/>Footer (noinclude):<br/>'			+'<textarea name="footerTextbox" rows="4" cols="80">'+pageFooter+'</textarea>';		saveButton = document.getElementById("wpSave"); 		saveButton.setAttribute("onclick","proofreadPageFillForm(this.form);");		previewButton = document.getElementById("wpPreview"); 		previewButton.setAttribute("onclick","proofreadPageFillForm(this.form);");	} else cell_left.appendChild(new_text);	copywarn = document.getElementById("editpage-copywarn");	if(copywarn){ 		f.insertBefore(table,copywarn);	} else {		f.appendChild(table);	}}
meta: 10854	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10854/c59ce78ec4bc8cd10574b63738cd3a6317a64095/proofread.js/clean/proofread.js