User:WOSlinkerBot/linttask21.js

function lint_queryString(p) {

var re = RegExp('[&?]' + p + '=([^&]*)');

var matches;

if (matches = re.exec(document.location)) {

try {

return decodeURI(matches[1]);

} catch (e) { }

}

return null;

}

//Add a 'lint edit' tab

if(mw.config.get('wgArticleId') != 0 ) {

$( function lintEditButton() {

mw.util.addPortletLink('p-cactions',

mw.util.getUrl(null,{action:'edit',lintedit:true}),

'lint',

'p-lint',

'lint edit');

}

)}

if(mw.config.get('wgAction') == 'edit' && lint_queryString('lintedit') == 'true') {

$(function lint() {

var myContent = document.getElementById('wpTextbox1').value;

myContent = myContent.replace(/(

)\(\'\'\'EURO\[\[Image\:Wiki Eurovision Heart \(Infobox\)\.svg\|36px\]\]ISION\'\'\')(\\<\/div\>)\<\/font\>/g,'$1$3$4');

myContent = myContent.replace(/(

)\(\'\'\'EURO\[\[Image\:Wiki Eurovision Heart \(Infobox\)\.svg\|36px\]\]ISION\'\'\')(\<\/div\>)\<\/font\>/g,'$1$3$4');

myContent = myContent.replace(/(\

)\(\'\'\'WikiProject Newsletter - \w* \d*\'\'\')(\<\/div\>)\<\/font\>/g,'$1$2$3');

myContent = myContent.replace(/(\

)\(\'\'\'• WikiProject News •\'\'\')(\<\/div\>)/g,'$1$2$3');

myContent = myContent.replace(/(\

)\(\'\'Issue \#20 • July 2012\'\')(\<\/div\>)\<\/font\>/g,'$1$2$3');

myContent = myContent.replace(/(\| \'\'\'\[\[Wikipedia\:WikiProject Yorkshire\/Newsletter\/\w* \d*\|Single-Page View\]\])(\<\/small\>)(\'\'\')\<\/div\>/g,'$1$3$2');

myContent = myContent.replace(/(\| \'\'\'\[\[Wikipedia\:WikiProject Yorkshire\/Newsletter\/\w* \d*\|Single-Page View\]\])(\<\/small\>)(\'\'\')/g,'$1$3$2');

myContent = myContent.replace(/(\\Got any suggestions\?\
— \'\'Add them \[\[WT\:YORKS\|\here\<\/span\>\]\]\'\'\<\/small\>)(\\n)/g,'$1$2');

myContent = myContent.replace(/(\\Got any suggestions\?\ — \'\'Add them \[\[WT\:YORKS\|\here\<\/font\>\]\]\'\'\<\/small\>)(\\n)/g,'$1$2');

myContent = myContent.replace(/(\[\[User talk\:TaerkastUA\|\\'\'\'Talk)(\]\])(\'\'\'\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:Sirex98\|\\\'\'\'≡Ѕirex98≡\'\'\')(\]\])(\<\/span\>\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\'\' \'\'\'\[\[User\:Île_flottante\|\\Île flott.nte~Flo.ting isl.nd\<\/big\>\<\/font\>\]\] \[\[User talk\:Île_flottante\|\\Talk\<\/sup\>\<\/font\>\]\])(\'\') (\'\'\')/g,'$1$3 $2');

myContent = myContent.replace(/(\[\[User\:SpinkZeroZero\|\\Mr\. Spink)(\]\])(\<\/span\>\<\/b\>)/g,'$1$3$2');

myContent = myContent.replace(/(\\\[\[User_talk\:SpinkZeroZero\|\talk)(\]\].\[\[Special\:Contributions\/SpinkZeroZero\|\contribs)(\]\])(\<\/span\>)(\<\/span\>)(\<\/sup\>\<\/sup\>)/g,'$1$4$2$5$3$6');

myContent = myContent.replace(/(\[\[User\:MJCdetroit\|)(\)(\'\'\')(MJC\<\/font \>\detroit)(\'\'\')(\<\/font \>)(\]\])/g,'$1$3$2$4$6$5$7');

myContent = myContent.replace(/(\[\[User\:Danielfolsom\|\daniel)(\]\]\[\[User[_ ]talk\:Danielfolsom\|\folsom)(\]\])(\<\/span\>)(\<\/span\>)/g,'$1$4$2$5$3');

myContent = myContent.replace(/(\[\[User talk\:Chasewc91\|\talk)(\]\])(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User talk\:Corvoe\|\\(speak to me\))(\]\])(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:Goldman60\|\Gold Man60)(\]\])(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:PRODUCER\|\\.PRODUCER)(\]\])(\<\/font\>\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:PRODUCER\|\\PRODUCER)(\]\])(\<\/font\>\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\\[\[Help\:Japanese\|.\]\] · \\[\[User talk\:Nihonjoe\|Talk to Nihonjoe)(\]\]\<\/sup\>)(\<\/small\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:CorleoneSerpicoMontana\|\\ \;CorleoneSerpicoMontana\ \;)(\]\])(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\\[\[User talk\:Wesley Mouse\|\T@lk\<\/span\>\]\])(\'\'\')(\<\/sup\>)(\<\/span\>)/g,'$1$3$2$4');

myContent = myContent.replace(/(\[\[User talk\:Signalhead\|\\\<\;\\ \;\'\'\'T\'\'\'\ \;\<\/small\>\>\;)(\]\])(\<\/sup\>\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:Signalhead\|)(\)(\\'\'\'S\'\'\'ignal\<\/font\>\head\<\/font\>\]\]\ \;\[\[User talk\:Signalhead\|\\\<\;\\ \;\'\'\'T\'\'\'\ \;\<\/small\>\>\;\<\/sup\>\<\/font\>\]\]\<\/span\>)/g,'$2$1$3');

myContent = myContent.replace(/(\[\[User talk\:Strdst_grl\|\\(call me Stardust\))(\]\])(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\\[\[User\:LAAFan\/Editor review \(LAAFan\) \|review\]\])(\'\')(\<\/sub\>)/g,'$1$3$2');

myContent = myContent.replace(/(\\[\[Wikipedia\:Editor review\/LAAFan \d\|review\]\])(\'\')(\<\/sub\>)/g,'$1$3$2');

myContent = myContent.replace(/(\\[\[Wikipedia\:Editor review\/LAAFan \(\d\)\|review\]\])(\'\')(\<\/sub\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User talk\:J-stan\|\)(\)\'\'(Jus\<\/font\>\tin)\'\'(\<\/font\>)(\<\/strong\>\]\])/g,'$1\'\'$2$3$4\'\'$5');

myContent = myContent.replace(/(\'\'\')(\)(\[\[User_talk\:NottNott\|let\'s talk\!\]\]\'\'\' \[\[Special\:Contributions\/NottNott\|contrib\]\]\<\/small\>)/g,'$2$1$3');

myContent = myContent.replace(/(\[\[User\:La Pianista\|)(\)\'\'\'(La\<\/font\>\ \;\Pianista)\'\'\'(\<\/font\>)(\]\])/g,'$1\'\'\'$2$3$4\'\'\'$5');

myContent = myContent.replace(/(\'\'\'\[\[User\:Gloss\|\Gloss\<\/span\>\]\]\ \;•\ \;\[\[User_talk\:Gloss\|\talk)(\]\]\'\'\')(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:Alxeedo\|\\Alxeedo\<\/big\>)(\]\])(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:Blofeld of SPECTRE\| \ \\'\'\'\'\'[♦\. \w]*\'\'\'\'\'\<\/font\>)(\]\])(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:Dr\. Blofeld\| \ \\'\'\'\'\'[\. \w]*\'\'\'\'\'\<\/font\>)(\]\])(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User talk\:Dr\. Blofeld\| \ \\'\'\'\'\'[\. \w]*\'\'\'\'\'\<\/font\>)(\]\])(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User talk\:Lahiru_k\|\\walkie-talkie)(\<\/font\>\]\])(\<\/sup\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User_talk\:FenixFeather\|\\(talk\))(\]\])(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[Special\:Contributions\/FenixFeather\|\\(Contribs\))(\]\])(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\\'\'\\[\[User talk\:Jamesontai\|talk\]\] . \[\[Special\:Contributions\/Jamesontai\|contribs\]\])(\'\')(\<\/font\>)(\<\/sup\>)/g,'$1$3$2$4');

myContent = myContent.replace(/(\Chequers)(\'\')(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User talk\:Karl 334\|\\\.\<\/big\>\'\'TALK to ME\'\' \.\<\/big\>\<\/sup\>)(\]\])(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User talk\:Karl 334\|\\\'\'Talk-\'\'\<\/sup\>)(\]\]\[\[Special\:Contributions\/Karl_334\|\\\'\'-Contribs\'\'\<\/sup\>)(\]\])(\<\/font\>)(\<\/font\>)/g,'$1$4$2$5$3');

myContent = myContent.replace(/(\[\[User talk\:AlexiusHoratius\|\\'\'\'Horatius\'\'\')(\]\])(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:Ale_jrb\|\A\<\/font\>\\le_Jrb\<\/font\>)(\]\])(\<\/small\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User talk\:Blackcat\|\aka \'\'\'the Black Cat\'\'\')(\]\])(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\'\'\')(\)(\[\[User\:The Psychless\|\Psych\<\/font\>\less \<\/font\>\]\]\'\'\')/g,'$2$1$3');

myContent = myContent.replace(/(\[\[User\:Minor4th\|)(\)(\)(Minor\<\/b\>\4th)(\<\/font face\>)(\<\/b\>)(\]\])/g,'$1$3$2$4$6$5$7');

myContent = myContent.replace(/(\\\[\[User talk\:Taxman\|Talk\]\])(\<\/sup\>)(\<\/small\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User_talk\:Maelefique\|\\(t\a\<\/span\>lk\))(\]\])(\<\/sup\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:AutomaticStrikeout\|)(\)(\'\'\')(Automatic\<\/span\>\\'\'Strikeout\'\')(\'\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4$6$5$7');

myContent = myContent.replace(/(\[\[User talk\:Trekphiler\|\\[\w \'\,♠\&\.\?\!]*\<\/sup\>)(\]\])(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User talk\:Trekphiler\|\\\[\w \'\,♠\&\.\?\!]*\<\/small\> *\<\/sup\>)(\]\])(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User talk\:Trekphiler\|\\\[\w \'\,♠\&\.\?\!]*\<\/small\> *\<\/sup\>)(\]\])(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User talk\:Musa Raza\|\Talk)(\]\])(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/\—\\[\[user\:Mono\|\\'\'\'m\'\'\'\<\/font\>\\'\'\'o\'\'\'\<\/font\>\\'\'\'n\'\'\'\<\/font\>\\'\'\'o\'\'\'\]\]\<\/font\>\<\/span\>\<\/font\>/g,'\'\'\'m\'\'\'\'\'\'o\'\'\'\'\'\'n\'\'\'\'\'\'o\'\'\'');

myContent = myContent.replace(/\[\[User\:AKMask\|\M\]\]\<\/font\>/g,'M');

myContent = myContent.replace(/\\[\[User_talk\:AKMask\|\ask\]\]\<\/font\>\<\/sup\>/g,'ask');

myContent = myContent.replace(/(\\'\'\'\[\[User\:Carolmooredc\|Carolmooredc\]\] \(\[\[User talk\:Carolmooredc\|Talkie-Talkie\]\]\))(\<\/small\>)(\'\'\')/g,'$1$3$2');

myContent = myContent.replace(/(\[\[Special\:Contributions\/Zenswashbuckler\|\\.☠)(\]\])(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\\♥)(\<\/b\>)(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:lewisskinner\|\'\'\'\L\.J\.Skinner)(\'\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4');

myContent = myContent.replace(/(\[\[User\:Gary Dee\|\'\'\'\Gary)(\'\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4');

myContent = myContent.replace(/(\[\[User talk\:Gary Dee\|\'\'\'\Dee)(\'\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4');

myContent = myContent.replace(/(\[\[User talk\:Bevinbell\|\'\'\'\bell)(\'\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4');

myContent = myContent.replace(/(\[\[User talk\:Wayne Olajuwon\|\'\'\'\OLAJUWON)(\'\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4');

myContent = myContent.replace(/(\[\[User\:Active Banana\|\\'\'\'Banana)(\<\/span\>)(\'\'\')(\]\])/g,'$1$3$2$4');

myContent = myContent.replace(/(\\'\'\'\one of many\<\/span\> \\[\[User\:Editorofthewiki\|editorofthewiki\]\]s \\(\[\[User talk\:Editorofthewiki\#top\|\talk\<\/span\>\]\]\/\[\[Special\:Contributions\/Editorofthewiki\|\contribs\<\/span\>\]\]\/\[\[Wikipedia\:Editor review\/Editorofthewiki\|\editor review\<\/span>\]\]\)\<\/sup\>)(\'\'\')(\<\/span\>)(\<\/strong\>)/g,'$1$3$2$4');

myContent = myContent.replace(/(\[\[User\:Apollo1758\|\'\'\'\Apollo1758)(\'\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4');

myContent = myContent.replace(/(\[\[User\:Martin23230\|\'\'\'\23230)(\'\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4');

myContent = myContent.replace(/(\[\[User\:Optimist on the run\|\'\'\'\optimist)(\'\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4');

myContent = myContent.replace(/(\[\[User Talk\:Optimist on the run\|\'\'\run\!)(\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4');

myContent = myContent.replace(/(\)(\'\'\')(✔\<\/span\> \[\[User\:Olaf Stephanos\|Olaf Stephanos\]\]\'\'\')/g,'$2$1$3');

myContent = myContent.replace(/(\)(\'\'\')(\&\#10004\;\<\/span\> \[\[User\:Olaf Stephanos\|Olaf Stephanos\]\]\'\'\')/g,'$2$1$3');

myContent = myContent.replace(/(\[\[User\:MishMich\|\\Mish\<\/span\>\Mich\<\/span>)(\]\])(\<\/b\>)/g,'$1$3$2');

myContent = myContent.replace(/(\\ \[\[User\:216\.153\.214\.94\|216\.153\.214\.94\]\] )(\<\/sup\>)(\<\/b\>)/g,'$1$3$2');

// myContent = myContent.replace(//g,'');

if(document.getElementById('wpTextbox1').value != myContent) {

if(document.getElementById('wpTextbox1').value != myContent) {

document.getElementById('wpTextbox1').value=myContent;

document.getElementById('wpSummary').value='Fix misnested tag lint errors';

document.getElementById('wpMinoredit').checked = true;

}

}

}

)}