User:Midas02/Zeusmode/whatlinkshere.js

//- // Ajax What Links Here 0.34 // by User:Zanaq (c) 2010 GPL // // No new pages open if the user wants to navigate // The Tree of What Links There // Fix disambiguations and (double) redirects // ---

clickedLi=-1; trackLi=0; trackUl=0; fixinglink=0; isnotwatched=0; isamsterdamconstruction=0;

function toggleMoreContext(id) {   q=document.getElementById('taat' + id); r=document.getElementById('taa' + id); if (r.style.display == 'none') {	q.innerHTML = ' &mdash; '; r.style.display = 'block'; } else { q.innerHTML = '+'; r.style.display = 'none'; } }

function savedDiff(li) {   if (xmlhttp.readyState != 4) return; p = document.getElementById('editform' + clickedLi).action.indexOf('&action=') chklnk=document.getElementById('editform' + clickedLi).action.substring(0,p) + "&diff=last"; document.getElementById('hiddeneditform' + clickedLi).innerHTML = xmlhttp.responseText;

parser=new DOMParser; xmlDoc=parser.parseFromString(xmlhttp.responseText,"text/xml"); document.getElementById('diff' + clickedLi).innerHTML = ' ' + ' ' + txtSaved + ' [' + txtCheck + '...]' + ' ';

document.getElementById('diff' + clickedLi).innerHTML += '';

fixinglink=0;

}

function saveDiff(li) {   clickedLi = li;

params = 'wpSave=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpSave.value); et=document.getElementById('editform' + clickedLi).wpEditToken.value; params += '&wpAutoSummary=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpAutoSummary.value); params += '&oldid=' + encodeURIComponent(document.getElementById('editform' + clickedLi).oldid.value); params += '&wpStarttime=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpStarttime.value); params += '&wpEdittime=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpEdittime.value); if (isredirect) summ = txtFixDoubleRedirect + ' - ' + document.getElementById('editform' + clickedLi).wpTextbox1.value else if (isdisambiguation) summ = txtFixDisambiguation + ' - ' + document.getElementById('editform' + clickedLi).wpSummary.value else summ = (typeof(txtFixLink) != 'undefined') ? txtFixLink : document.getElementById('editform' + clickedLi).wpSummary.value;

params += '&wpSummary=' + encodeURIComponent(summ); params += '&wpMinoredit=' + '1'; //alert(document.getElementById('editform' + clickedLi).wpWatchthis.value);

if (isnotwatched < 0) {

params += '&wpWatchthis=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpWatchthis.value); }	   params += '&wpTextbox1=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpTextbox1.value); params += '&wpEditToken=' + encodeURIComponent(et);

query= document.getElementById('editform' + clickedLi).action; xmlhttp = HTTPClient; if (!xmlhttp) return; xmlhttp.open("POST", query, true); xmlhttp.onreadystatechange = savedDiff; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(params);

}

function cancelFix(li) {

document.getElementById('hiddeneditform' + li).innerHTML = ''; document.getElementById('diff' + li).innerHTML = '';

document.getElementById('fix' + li).style.display='inline'; fixinglink=0; }

function showDiff {   if (xmlhttp.readyState != 4) return;

isnotwatched=xmlhttp.responseText.indexOf('' + '' + ' ';   document.getElementById('loading' + clickedLi).style.display='none';

}

function fixLinkOnFocus(id) {   ta=document.getElementById(id); a = ta.value.toUpperCase.indexOf( + wgTitle.replace('_', ' ').toUpperCase + );   b = ta.value.indexOf('',a+1)+2; if ((a > 0) && (b>0)) {	ta.selectionStart=a+2; ta.selectionEnd=b-2; } } function saveFix(id, n) { wt=document.getElementById('taa0--1').value; for (i=0;i<n;i++) {	t=document.getElementById('ta' + id + '-' + i).value; a=(t.substring(0,3)=='...') ? 3 : 0;	b=(t.substring(t.length-3)=='...') ? t.length-3 : t.length; wt+=t.substring(a,b) + document.getElementById('taa' + id + '-' + i).value; }   document.getElementById('editform' + id).wpTextbox1.value = wt; document.getElementById('editform' + id).wpSummary.value = document.getElementById( 'summ' + id).value; saveDiff(id); }

function previewFix(id, n) { wt=document.getElementById('taa0--1').value; for (i=0;i<n;i++) {	t=document.getElementById('ta' + id + '-' + i).value; a=(t.substring(0,3)=='...') ? 3 : 0;	b=(t.substring(t.length-3)=='...') ? t.length-3 : t.length; wt+=t.substring(a,b) + document.getElementById('taa' + id + '-' + i).value; }   document.getElementById('editform' + id).wpTextbox1.value = wt; document.getElementById('editform' + id).wpSummary.value = document.getElementById( 'summ' + id).value; params = 'wpDiff=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpDiff.value); params += '&wpEditToken=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpEditToken.value); params += '&oldid=' + encodeURIComponent(document.getElementById('editform' + clickedLi).oldid.value); params += '&wpStarttime=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpStarttime.value); params += '&wpEdittime=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpEdittime.value); params += '&wpSummary=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpSummary.value);

params += '&wpTextbox1=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpTextbox1.value); query= document.getElementById('editform' + clickedLi).action; xmlhttp = HTTPClient; if (!xmlhttp) return; xmlhttp.open("POST", query, true); xmlhttp.onreadystatechange = showDiff; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(params); }

function replaceLink(id, replaceText) {   replaceText=unescape(replaceText); rt=replaceText; ta=document.getElementById('ta' + id);

a = ta.value.toUpperCase.indexOf( + wgTitle.replace('_', ' ').toUpperCase + )+2;   b = ta.value.indexOf('',a+1); c = ta.value.indexOf('|',a+1);

if (document.getElementById('chtxt' + clickedLi).checked == false) {	if (c>-1 && c < b) 	{ b = c;	} else { replaceText += '|' + ta.value.substring(a,b) }   }

if ((a > -1) && (b >- 1)) {	ta.value = ta.value.substring(0,a) + replaceText + ta.value.substring(b) document.getElementById('dab' + id).style.display='none'; sep = (document.getElementById( 'summ' + id.substring(0,id.indexOf('-')) ).value == '') ?  : ', ';	document.getElementById(	   'summ' + id.substring(0,id.indexOf('-'))	    ).value+= sep +  + wgTitle.replace('_', ' ') + ' → ' + rt + ''; ta.selectionStart=a; ta.selectionEnd=a+replaceText.length; ta.focus; } }

function fixLinkLoadForm {   if (xmlhttp.readyState != 4) return; a=xmlhttp.responseText.indexOf('<form id="editform"'); b=xmlhttp.responseText.indexOf(' ',a+1)+7; ef = xmlhttp.responseText.substring(a,b).replace('<form id="editform"', '<form id="editform' + clickedLi + '"'); document.getElementById('hiddeneditform' + clickedLi).innerHTML = ef; redir=document.getElementById('li'+clickedLi).parentNode.parentNode.parentNode;

var regexFindTemplates = RegExp('(' + redirectKeywords + ')','im'); editText = document.getElementById('editform' + clickedLi).wpTextbox1.innerHTML; a= regexFindTemplates.exec(editText); if ((a && !isredirect) || (!a && !isredirect)) {	t=[editText]; //complete text l=[]; //links lc=0; for (i=0;i -1) && (b>-1)) {		t[1 + i] = t[i].substring(a,b); l[lc++] = i+1; t[2 + i] = t[i].substring(b); t[i] = t[i].substring(0,a); document.getElementById('diff' + clickedLi).innerHTML += t[i++].substring(a,b); } 	}	a = (t[0].length < 300) ? 0 : t[0].length -300;

weird=t[0].substring(a).indexOf(';');

if ((weird < 5) && (weird != -1)) {	   a = a + 1 + weird; }

if (t[0].substring(a).charCodeAt(0) == 10) {	   a = a + 1; }

document.getElementById('diff' + clickedLi).innerHTML += ' + ' + t[0].substring(0,a) + ' ';	pta=t[0].substring(a); dotsO=(a!=0) ? '...' : '';

for (i=0;i 100) ? 300 : Math.floor((t[l[i]+1].length)/2); b = (t[l[i]+1].length < m) ? t[l[i]+1].length : m; dotsC=(b < (t[l[i]+1].length-1)) ? '...' : '';	   weird=t[l[i]+1].substring(b).indexOf(';');

if ((weird < 5) && (weird != -1)) {		b = b + 1 + weird; }	   if (t[l[i]+1].substring(b).charCodeAt(0) == 10) {		b = b + 1; }	   q = '' + dotsO + pta + t[l[i]] + t[l[i]+1].substring(0,b) + dotsC + ' ';	   q += ' + ' + t[l[i]+1].substring(b) + ' ';	   pta=''; document.getElementById('diff' + clickedLi).innerHTML +=q; if (true)//(!isredirect) {		a = wikiText.indexOf('[[');

if (isamsterdamconstruction) { hbl = ''; } else { hbl = ''; }		q=hbl; while(a>-1) {		   b = wikiText.indexOf(']]',a+1); if ((a > -1) && (b>-1)) {			lt=wikiText.substring(a+2,b); c=lt.indexOf('|'); lt=(c>0) ? lt.substring(0,c) : lt; d=lt.indexOf(':',1); if ((d > 6) || (d < 1)) //ugly workaround for interwiki's			{ q += ''; }		   }		    a = wikiText.indexOf('[[',b+1);		}

if (typeof(lt) != 'undefined') { z =	'  ' + txtChangeLinktext +' '; }	else { z = ''; }

document.getElementById('diff' + clickedLi).innerHTML += '<div id=dab' + clickedLi + '-' + i + ' style=margin-bottom:.5em>' + q + z + 	' '; }	}

if (i < 1) {

cancelFix(clickedLi); document.getElementById('li' + clickedLi).innerHTML += '<img src="//upload.wikimedia.org/wikipedia/commons/thumb/a/a2/X_mark.svg/20px-X_mark.svg.png">'+wgTitle; document.getElementById('loading' + clickedLi).style.display='none';

} else { document.getElementById('diff' + clickedLi).innerHTML += '<input type=input id=summ' + clickedLi + ' maxlength="200" size="60" >'; document.getElementById('diff' + clickedLi).innerHTML += '<input type=button value="' + txtSavePage + '" onClick="javascript:saveFix(' + clickedLi + ',' + l.length + ')">' // style=display:none>' //always preview until tested well +'<input type=button value="' + txtPreview + '" onClick="javascript:previewFix(' + clickedLi + ',' + l.length + ')">' +'<input type=button value="' + txtCancel + '" onClick="javascript:cancelFix(' + clickedLi + ')">'; document.getElementById('ta' + clickedLi + '-0').focus; document.getElementById('loading' + clickedLi).style.display='none'; }   } else { document.getElementById('editform' + clickedLi).wpTextbox1.value = '#REDIRECT ' + wikiText; params = 'wpDiff=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpDiff.value); params += '&wpEditToken=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpEditToken.value); params += '&oldid=' + encodeURIComponent(document.getElementById('editform' + clickedLi).oldid.value); params += '&wpStarttime=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpStarttime.value); params += '&wpEdittime=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpEdittime.value); params += '&wpTextbox1=' + encodeURIComponent(document.getElementById('editform' + clickedLi).wpTextbox1.value); query= document.getElementById('editform' + clickedLi).action; xmlhttp = HTTPClient; if (!xmlhttp) return; xmlhttp.open("POST", query, true); xmlhttp.onreadystatechange = showDiff; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(params); } }

function fixLink(li, title) {   if (fixinglink) {	alert(txtSaveCancel); return; }   fixinglink = 1; clickedLi = li; url='//en.wikipedia.org/w/index.php?title=' + title + '&action=edit';

document.getElementById('fix' + clickedLi).style.display='none'; document.getElementById('loading' + clickedLi).style.display='inline'; xmlhttp = HTTPClient; if (!xmlhttp) return; xmlhttp.open("GET", url, true); xmlhttp.onreadystatechange = fixLinkLoadForm; xmlhttp.send(null); }

//adds javascript links to a list titles=''; function modifyList(id) {   //alert(document.cookie); l=document.getElementById(id);

l=l.getElementsByTagName('li');

for (i=0;i<l.length;i++) {	span=l[i].getElementsByTagName('span')[0]; if (l[i].innerHTML.indexOf('</a> (' + txtRedirect + ') <span') > 0) {	   url=l[i].getElementsByTagName('a')[0].href; title=url.substring(url.indexOf('?title=')+7, url.indexOf('&redirect=')); alert('+' + title); //l[i].innerHTML.replace('</a> (' + txtRedirect + ') <span', '</a> (' + txtRedirect + ') <span'); d = 'style=display:none'; e = ''; } else {

url = l[i].getElementsByTagName('a')[0].href; a = url.indexOf('&redirect='); if (a > 0) {		title=url.substring(url.indexOf('title=')+6, a); } else { title=url.substring(wgServer.length + 7 + document.location.href.indexOf('://')); }	   e = 'style=display:none'; d = ''; }

span.innerHTML = span.innerHTML.substring(0, span.innerHTML.length -1) + ' <a ' + d + ' href=\'javascript:openAjaxWhatLinksHere(' + trackLi + ',"' 	+ encodeURIComponent(title) + '")\'> [' + txtShowLink + ']</a>' +'<a ' + e + ' href="javascript:closeAjaxWhatLinksHere(' + trackLi 	+ ')"> [' + txtHideLink + ']</a> <span id=loading' + trackLi + ' style=display:none>' + txtLoading + ' ' + ' <a id=fix' + trackLi + ' href=\'javascript:fixLink(' + trackLi + ',"' + encodeURIComponent(title) + '")\'>[' + txtFix + ']</a>' + ' <a href="/w/index.php?title=' + title + '&action=edit">[' + txtEditTopLink + ']</a>' + ')';

span.getElementsByTagName('a')[0].innerHTML = '←'; ul = l[i].getElementsByTagName('ul')[0]; //if there's already an ul, put it at the end. if (ul) { ulh = '<ul>' + ul.innerHTML + '</ul>'; l[i].removeChild(ul); } else { ulh = ''; }	l[i].innerHTML= '<span id=li' + (trackLi) + '>' + l[i].innerHTML + '<span id="diff' + trackLi + '"> <span style=display:none id="hiddeneditform' + trackLi + '"> ' + ulh;

trackLi++; titles+='|' + title; } }

//User clicked hide function closeAjaxWhatLinksHere(id) {

li=document.getElementById('li' + id); ul = li.getElementsByTagName('ul')[0];

li.removeChild(ul);

li.getElementsByTagName('span')[0].getElementsByTagName('a')[1].style.display='inline'; li.getElementsByTagName('span')[0].getElementsByTagName('a')[2].style.display='none';

}

//Http request complete: inject content function insertAjaxWhatLinksHere {   if (xmlhttp.readyState != 4) return; parser=new DOMParser; xmlDoc=parser.parseFromString(xmlhttp.responseText,"text/xml"); newlinks=xmlDoc.getElementById('mw-whatlinkshere-list'); if (newlinks) {	document.getElementById('li' + clickedLi).innerHTML+='<ul id=ul' + trackUl + '>' + newlinks.innerHTML + '</ul>'; document.getElementById('li' + clickedLi).getElementsByTagName('span')[0].getElementsByTagName('a')[2].style.display='inline'; document.getElementById('li' + clickedLi).getElementsByTagName('span')[0].getElementsByTagName('span')[0].style.display='none'; modifyList('ul' + trackUl++); } else { document.getElementById('li' + clickedLi).getElementsByTagName('span')[0].innerHTML=''; }

}

//User clicked expand function openAjaxWhatLinksHere(li, title) {   clickedLi=li; l=document.getElementById('mw-whatlinkshere-list').getElementsByTagName('li'); parameters= document.location.href.indexOf('&'); parameters=(parameters > 0) ? document.location.href.substring(parameters) : ''; url='/w/index.php?title=Special:WhatLinksHere/' + title + parameters;

document.getElementById('li' + clickedLi).getElementsByTagName('span')[0].getElementsByTagName('a')[1].style.display='none'; document.getElementById('li' + clickedLi).getElementsByTagName('span')[0].getElementsByTagName('span')[0].style.display='inline';

xmlhttp = HTTPClient; if (!xmlhttp) return; xmlhttp.open("GET", url, true); xmlhttp.onreadystatechange = insertAjaxWhatLinksHere; xmlhttp.send(null); }

//add Ajax controls to the list function addAjaxWhatLinksHere {   document.getElementById('namespace').value = 0; modifyList('mw-whatlinkshere-list');

}

function showPages {   if (xmlhttp.readyState != 4) return; pageTitle=document.getElementById('contentSub').getElementsByTagName('a')[0].href pageTitle=pageTitle.substring(pageTitle.indexOf('=')+1, pageTitle.indexOf('&')); sm=document.getElementById('statusMsg'); sm.innerHTML+='.....'; parser=new DOMParser; xmlDoc=parser.parseFromString(xmlhttp.responseText,"text/xml"); pages=xmlDoc.getElementsByTagName('page') ul = document.getElementById('bodyContent').getElementsByTagName('ul')[0] ul.innerHTML=''; for (i=0;i<pages.length;i++) {	ul.innerHTML+='<li>'+pages[i].getAttribute("title") + '-'; pageText = pages[i].getElementsByTagName('rev')[0].childNodes[0].nodeValue; var regexFindLink = RegExp('\\[\\['+ pageTitle + '\\]\\]','im'); a = regexFindLink.exec(xmlhttp.responseText); ul.innerHTML+=' -' + pageText.substring(pageText.indexOf(a[0])-100,pageText.indexOf(a[0])+100); ul.innerHTML+=' -' + a[0]; } }

function loadPages {   query='//en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=xml&titles=' + titles.substring(1); document.getElementById('statusMsg').innerHTML=txtLoading; xmlhttp = HTTPClient; if (!xmlhttp) return; xmlhttp.open("GET", query, true); xmlhttp.onreadystatechange = showPages; xmlhttp.send(null);

}

function showDisamb {   document.getElementById('showDisamb').style.display='none'; document.getElementById('hideDisamb').style.display='inline'; document.getElementById('dContent').style.display='inline'; }

function hideDisamb {   document.getElementById('showDisamb').style.display='inline'; document.getElementById('hideDisamb').style.display='none'; document.getElementById('dContent').style.display='none'; }

function insertControls2 {   if (xmlhttp.readyState != 4) return; parser=new DOMParser; xmlDoc=parser.parseFromString(xmlhttp.responseText,"text/xml"); html=xmlDoc.getElementsByTagName('text')[0].childNodes[0].nodeValue; document.getElementById('dContent').innerHTML=html; if (isredirect) {	document.getElementById('dContent').innerHTML = '<img src="//bits.wikimedia.org/skins-1.5/common/images/redirectltr.png" alt="#REDIRECT "> ' + document.getElementById('dContent').getElementsByTagName('p')[0].innerHTML + ' ';   }    document.getElementById('statusMsg').innerHTML=''; }

//Displays if the page is a disambiguation page isdisambiguation=false; isredirect=false; wikiText=''; function insertControls {

if (xmlhttp.readyState != 4) return;

var regexFindTemplates = RegExp('\\{\\{(' + disambiguationTemplates + ')(.*)\\}\\}','im'); a = regexFindTemplates.exec(xmlhttp.responseText);

if (a) {	isdisambiguation=true; isredirect=false; txtPageType=txtDisambiguation;

} else {

var regexFindTemplates = RegExp('\\[\\[(' + wgTitle + '..disambiguation.' + ')(.*)\\]\\]','im'); b = regexFindTemplates.exec(xmlhttp.responseText); if (b) {	   seemsToBeTheAmsterdamConstruction; return; } else {

var regexFindTemplates = RegExp('\\{\\{(' + 'zie dp' + ')','im'); b = regexFindTemplates.exec(xmlhttp.responseText); if (b) {	   seemsToBeTheAmsterdamConstruction; return; }

}

var regexFindTemplates = RegExp('(' + redirectKeywords + ')','im'); a = regexFindTemplates.exec(xmlhttp.responseText); if (a) {	   isredirect=true; isdisambiguation=false; txtPageType=txtRedirect; } else {

return; }   }    //create a fieldset for the disambiguator/redirect fixer cs=document.getElementById('contentSub'); cs.innerHTML += ' (' + txtPageType + ')'; bc = document.getElementById('bodyContent');

y = bc.getElementsByTagName('fieldset')[0]; newNode = document.createElement("fieldset"); newNode.innerHTML = ' ' + txtFix + ' ' + txtPageType //+ '<a href=\'javascript:loadPages\'> [+]</a>' + ' <a id=showDisamb href=\'javascript:showDisamb\'>[' + txtShowLink + ']</a>' + '<a id=hideDisamb style=display:none href=\'javascript:hideDisamb\'>[' + txtHideLink + ']</a>' + ' ';

document.getElementById('mw-content-text').getElementsByTagName('form')[0].innerHTML += newNode.innerHTML; document.getElementById('namespace').value = 0; //set the namespace *again* which for some reason changed back

//parse the wikitext of the disambiguation page/redirect wikiText = xmlhttp.responseText.replace(regexFindTemplates,'').trim; params='action=parse&format=xml&title=' + wgTitle + '&text=' + wikiText; query= mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php'; document.getElementById('statusMsg').innerHTML=txtLoading; xmlhttp = HTTPClient; if (!xmlhttp) return; xmlhttp.open("POST", query, true); xmlhttp.onreadystatechange = insertControls2; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(params); }

//Requests if the page is a disambiguation page function isDisambiguation {   wgTitle = document.getElementById('mw-whatlinkshere-target').value; // <-- modify global wikipedia variable title=encodeURIComponent(wgTitle);

url=mw.config.get('wgServer') + mw.config.get('wgScript') + '?title=' + title + '&action=raw';

xmlhttp = HTTPClient; if (!xmlhttp) return;

xmlhttp.open("GET", url, true); xmlhttp.onreadystatechange = insertControls; xmlhttp.send(null); }

function seemsToBeTheAmsterdamConstruction {

wgTitle = document.getElementById('mw-whatlinkshere-target').value; // <-- modify global wikipedia variable title=encodeURIComponent(wgTitle + '_(disambiguation)');

isamsterdamconstruction = 1;

url=mw.config.get('wgServer') + mw.config.get('wgScript') + '?title=' + title + '&action=raw';

xmlhttp = HTTPClient; if (!xmlhttp) return;

xmlhttp.open("GET", url, true); xmlhttp.onreadystatechange = insertControls; xmlhttp.send(null); }

//tool to go to the title without the brackets function bracketsremove {   h=document.location.href; a=h.indexOf('_(');   if ((wgTitle.substr(-1) == ')') && (a> 0)) {	document.getElementById('firstHeading').innerHTML += ' <a href="'+h.substring(0,a) + h.substring(h.indexOf(')')+1)+'">←</a>';   }

}

if ((zmUseWhatLinksHere) && (wgCanonicalSpecialPageName=='Whatlinkshere')) {   isDisambiguation; addAjaxWhatLinksHere; }

bracketsremove;

//