User:WOSlinkerBot/linttask21.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | Documentation for this user script can be added at User:WOSlinkerBot/linttask21. |
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(/(<div style\=\"text-align\: center\; float\: center\; clear\: center\;\"\>)\<font color\=\#000000 font size\=6 face\=\"([\w ]*)\"\>(\'\'\'EURO\[\[Image\:Wiki Eurovision Heart \(Infobox\)\.svg\|36px\]\]ISION\'\'\')(\<br\/?\>\<\/div\>)\<\/font\>/g,'$1<span style="color:#000000;font-size:xx-large;font-family:$2;">$3</span>$4');
myContent = myContent.replace(/(<div style\=\"text-align\: center\; float\: center\; clear\: center\;\"\>)\<font color\=\#000000 font size\=6 face\=\"([\w ]*)\"\>(\'\'\'EURO\[\[Image\:Wiki Eurovision Heart \(Infobox\)\.svg\|36px\]\]ISION\'\'\')(\<\/div\>)\<\/font\>/g,'$1<span style="color:#000000;font-size:xx-large;font-family:$2;">$3</span>$4');
myContent = myContent.replace(/(\<div style\=\"text-align\: center\;\"\>)\<font color\=\#FFFFFF font size\=2 face\=\"Eurostile\"\>(\'\'\'WikiProject Newsletter - \w* \d*\'\'\')(\<\/div\>)\<\/font\>/g,'$1<span style="color:#FFFFFF;font-size:small;font-family:Eurostile;">$2</span>$3');
myContent = myContent.replace(/(\<div style\=\"text-align\: center\; float\: center\; clear\: center\;\"\>)\<font color\=\#000000 font size\=4 face\=\"Comic Sans MS\"\>(\'\'\'• WikiProject News •\'\'\')(\<\/div\>)/g,'$1<span style="color:#000000;font-size:large;font-family:Comic Sans MS;">$2</span>$3');
myContent = myContent.replace(/(\<div style\=\"text-align\: center\; float\: center\; clear\: center\;\"\>)\<font color\=\#FFFFFF font size\=2 face\=\"Comic Sans MS\"\>(\'\'Issue \#20 • July 2012\'\')(\<\/div\>)\<\/font\>/g,'$1<span style="color:#FFFFFF;font-size:small;font-family:Comic Sans MS;">$2</span>$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(/(\<center\>\<small\>Got any suggestions\?\<br \/\> — \'\'Add them \[\[WT\:YORKS\|\<span style\=\"color\:\#000\;\"\>here\<\/span\>\]\]\'\'\<\/small\>)(\<br\/\>\n)/g,'$1</center>$2');
myContent = myContent.replace(/(\<center\>\<small\>Got any suggestions\?\<br\> — \'\'Add them \[\[WT\:YORKS\|\<font color\=\"\#000000\"\>here\<\/font\>\]\]\'\'\<\/small\>)(\<br\/\>\n)/g,'$1</center>$2');
myContent = myContent.replace(/(\[\[User talk\:TaerkastUA\|\<span style\=\"color\:red\"\>\'\'\'Talk)(\]\])(\'\'\'\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:Sirex98\|\<span style\=\"border\:3px solid \#aaf\;cursor\:crosshair\"\>\<span style\=\"background\:\#11e\;color\:\#bbf\"\>\'\'\'≡Ѕirex98≡\'\'\')(\]\])(\<\/span\>\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\'\' \'\'\'\[\[User\:Île_flottante\|\<font color\=\"6600FF\"\>\<big\>Île flott.nte~Flo.ting isl.nd\<\/big\>\<\/font\>\]\] \[\[User talk\:Île_flottante\|\<font color\=\"red\" size\=\"0\.5\"\>\<sup\>Talk\<\/sup\>\<\/font\>\]\])(\'\') (\'\'\')/g,'$1$3 $2');
myContent = myContent.replace(/(\[\[User\:SpinkZeroZero\|\<b\>\<span style\=\"color\:red\"\>Mr\. Spink)(\]\])(\<\/span\>\<\/b\>)/g,'$1$3$2');
myContent = myContent.replace(/(\<sup\>\<sup\>\[\[User_talk\:SpinkZeroZero\|\<span style\=\"color\:lightblue\"\>talk)(\]\].\[\[Special\:Contributions\/SpinkZeroZero\|\<span style\=\"color\:lightblue\"\>contribs)(\]\])(\<\/span\>)(\<\/span\>)(\<\/sup\>\<\/sup\>)/g,'$1$4$2$5$3$6');
myContent = myContent.replace(/(\[\[User\:MJCdetroit\|)(\<font color\=\"\#0000CD\"\>)(\'\'\')(MJC\<\/font \>\<font color\=\"\#FF0000\"\>detroit)(\'\'\')(\<\/font \>)(\]\])/g,'$1$3$2$4$6$5$7');
myContent = myContent.replace(/(\[\[User\:Danielfolsom\|\<span style\=\"color\: \#[A-F0-9]*\; background\: \#[A-F0-9]*\"\>daniel)(\]\]\[\[User[_ ]talk\:Danielfolsom\|\<span style\=\"color\:\#[A-F0-9]*\; background\:\#[A-F0-9]*\"\>folsom)(\]\])(\<\/span\>)(\<\/span\>)/g,'$1$4$2$5$3');
myContent = myContent.replace(/(\[\[User talk\:Chasewc91\|\<font color\=\"blue\"\>talk)(\]\])(\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User talk\:Corvoe\|\<span style\=\"font-family\: Arial\;color\: \#FF00FF\"\>\(speak to me\))(\]\])(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:Goldman60\|\<span style\=\"background-color\:black\;font-variant\:small-caps\;font-weight\:bold\;padding\:1px 4px 1px 4px\;color\:yellow\;\"\>Gold Man60)(\]\])(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:PRODUCER\|\<font color\=\"black\"\>\<font style\=\"letter-spacing\: 0\.2cm\;\"\>.PRODUCER)(\]\])(\<\/font\>\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:PRODUCER\|\<font color\=\"black\"\>\<font style\=\"letter-spacing\: 0\.2cm\;\"\>PRODUCER)(\]\])(\<\/font\>\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\<sup\>\[\[Help\:Japanese\|.\]\] · \<small\>\[\[User talk\:Nihonjoe\|Talk to Nihonjoe)(\]\]\<\/sup\>)(\<\/small\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:CorleoneSerpicoMontana\|\<span style\=\"border\: 1px\; border-style\:solid\; color\:white\; background-color\:red\"\>\ \;CorleoneSerpicoMontana\ \;)(\]\])(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\<sup\>\[\[User talk\:Wesley Mouse\|\<span style\=\"color\:\#[\w\d]*\"\>T@lk\<\/span\>\]\])(\'\'\')(\<\/sup\>)(\<\/span\>)/g,'$1$3$2$4');
myContent = myContent.replace(/(\[\[User talk\:Signalhead\|\<font color\=\"black\"\>\<sup\>\<\;\<small\>\ \;\'\'\'T\'\'\'\ \;\<\/small\>\>\;)(\]\])(\<\/sup\>\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:Signalhead\|)(\<span style\=\"font-variant\:small-caps\"\>)(\<font color\=\"red\"\>\'\'\'S\'\'\'ignal\<\/font\>\<font color\=\"green\"\>head\<\/font\>\]\]\ \;\[\[User talk\:Signalhead\|\<font color\=\"black\"\>\<sup\>\<\;\<small\>\ \;\'\'\'T\'\'\'\ \;\<\/small\>\>\;\<\/sup\>\<\/font\>\]\]\<\/span\>)/g,'$2$1$3');
myContent = myContent.replace(/(\[\[User talk\:Strdst_grl\|\<span style\=\"font-family\:Monotype Corsiva\;color\:LightSkyBlue\"\>\(call me Stardust\))(\]\])(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\<sub\>\[\[User\:LAAFan\/Editor review \(LAAFan\) \|review\]\])(\'\')(\<\/sub\>)/g,'$1$3$2');
myContent = myContent.replace(/(\<sub\>\[\[Wikipedia\:Editor review\/LAAFan \d\|review\]\])(\'\')(\<\/sub\>)/g,'$1$3$2');
myContent = myContent.replace(/(\<sub\>\[\[Wikipedia\:Editor review\/LAAFan \(\d\)\|review\]\])(\'\')(\<\/sub\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User talk\:J-stan\|\<strong\>)(\<font color\=\"Black\"\>)\'\'(Jus\<\/font\>\<font color\=\"Red\"\>tin)\'\'(\<\/font\>)(\<\/strong\>\]\])/g,'$1\'\'$2$3$4\'\'$5');
myContent = myContent.replace(/(\'\'\')(\<small\>)(\[\[User_talk\:NottNott\|let\'s talk\!\]\]\'\'\' \[\[Special\:Contributions\/NottNott\|contrib\]\]\<\/small\>)/g,'$2$1$3');
myContent = myContent.replace(/(\[\[User\:La Pianista\|)(\<font color\=\"\#00008B\"\>)\'\'\'(La\<\/font\>\ \;\<font color\=\"dodgerblue\"\>Pianista)\'\'\'(\<\/font\>)(\]\])/g,'$1\'\'\'$2$3$4\'\'\'$5');
myContent = myContent.replace(/(\'\'\'\[\[User\:Gloss\|\<span style\=\"font-family\:Arial\;color\:\#000080\"\>Gloss\<\/span\>\]\]\ \;•\ \;\[\[User_talk\:Gloss\|\<span style\=\"font-family\:Arial\;color\:\#007BA7\"\>talk)(\]\]\'\'\')(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:Alxeedo\|\<font family\=\"Exotc350 Bd BT\" color\=\"red\"\>\<big\>Alxeedo\<\/big\>)(\]\])(\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:Blofeld of SPECTRE\| \<span style\=\"border\:1px solid blue\;padding\:1px\;\"\> \<font style\=\"color\:\#fef\;background\:black\;\"\>\'\'\'\'\'[♦\. \w]*\'\'\'\'\'\<\/font\>)(\]\])(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:Dr\. Blofeld\| \<span style\=\"border\:1px solid blue\;padding\:1px\;\"\> \<font style\=\"color\:\#fef\;background\:black\;\"\>\'\'\'\'\'[\. \w]*\'\'\'\'\'\<\/font\>)(\]\])(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User talk\:Dr\. Blofeld\| \<span style\=\"border\:1px solid blue\;padding\:1px\;\"\> \<font style\=\"color\:\#fef\;background\:black\;\"\>\'\'\'\'\'[\. \w]*\'\'\'\'\'\<\/font\>)(\]\])(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User talk\:Lahiru_k\|\<font color\=\"blue\"\>\<sup\>walkie-talkie)(\<\/font\>\]\])(\<\/sup\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User_talk\:FenixFeather\|\<font color\=\"SlateBlue\"\>\(talk\))(\]\])(\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[Special\:Contributions\/FenixFeather\|\<font color\=\"SlateBlue\"\>\(Contribs\))(\]\])(\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\<sup\>\'\'\<font face\=\"Calibri\" color\=\"\#660000\"\>\[\[User talk\:Jamesontai\|talk\]\] . \[\[Special\:Contributions\/Jamesontai\|contribs\]\])(\'\')(\<\/font\>)(\<\/sup\>)/g,'$1$3$2$4');
myContent = myContent.replace(/(\<span style\=\"color\:DarkOrange\"\>Chequers)(\'\')(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User talk\:Karl 334\|\<font color\=\"Red\"\>\<sup\>\<big\>.\<\/big\>\'\'TALK to ME\'\' \<big\>.\<\/big\>\<\/sup\>)(\]\])(\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User talk\:Karl 334\|\<font color\=\"Red\"\>\<sup\>\'\'Talk-\'\'\<\/sup\>)(\]\]\[\[Special\:Contributions\/Karl_334\|\<font color\=\"Red\"\>\<sup\>\'\'-Contribs\'\'\<\/sup\>)(\]\])(\<\/font\>)(\<\/font\>)/g,'$1$4$2$5$3');
myContent = myContent.replace(/(\[\[User talk\:AlexiusHoratius\|\<span style\=\"font-size\:14px\;font-family\:times new roman\;color\:darkred\;\"\>\'\'\'Horatius\'\'\')(\]\])(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:Ale_jrb\|\<font color\=\"green\"\>A\<\/font\>\<small\>\<font color\=\"green\"\>le_Jrb\<\/font\>)(\]\])(\<\/small\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User talk\:Blackcat\|\<span style\=\"font-family\:Bookman Old Style\,Palatino Linotype\,Times New Roman\;font-size\:8pt\;color\:\#000000\"\>aka \'\'\'the Black Cat\'\'\')(\]\])(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/(\'\'\')(\<font face\=\"Kristen ITC\"\>)(\[\[User\:The Psychless\|\<font color\=\"ForestGreen\"\>Psych\<\/font\>\<font color\=\"DarkGreen\"\>less \<\/font\>\]\]\'\'\')/g,'$2$1$3');
myContent = myContent.replace(/(\[\[User\:Minor4th\|)(\<b span style\=\"color\:\#000000\;font-size\:110\%\;\"\>)(\<font face\=\"papyrus\"\>)(Minor\<\/b\>\<b span style\=\"color\:\#ff0000\;font-size\:80\%\;\"\>4th)(\<\/font face\>)(\<\/b\>)(\]\])/g,'$1$3$2$4$6$5$7');
myContent = myContent.replace(/(\<sup\>\<small\>\[\[User talk\:Taxman\|Talk\]\])(\<\/sup\>)(\<\/small\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User_talk\:Maelefique\|\<sup\>\(t\<span style\=\"color\:red\"\>a\<\/span\>lk\))(\]\])(\<\/sup\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User\:AutomaticStrikeout\|)(\<span style\=\"color\:Red\"\>)(\'\'\')(Automatic\<\/span\>\<span style\=\"color\:Green\"\>\'\'Strikeout\'\')(\'\'\')(\<\/span\>)(\]\])/g,'$1$3$2$4$6$5$7');
myContent = myContent.replace(/(\[\[User talk\:Trekphiler\|\<font face\=\"cursive\" color\=\"\#[A-F0-9]*\"\>\<sup\>[\w \'\,♠\&\.\?\!]*\<\/sup\>)(\]\])(\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User talk\:Trekphiler\|\<font face\=\"cursive\" color\=\"\#[A-F0-9]*\"\>\<sup\>\<small\>[\w \'\,♠\&\.\?\!]*\<\/small\> *\<\/sup\>)(\]\])(\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User talk\:Trekphiler\|\<font color\=\"\#[A-F0-9]*\"\>\<sup\>\<small\>[\w \'\,♠\&\.\?\!]*\<\/small\> *\<\/sup\>)(\]\])(\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\[\[User talk\:Musa Raza\|\<span style\=\"color\:Black\;\"\>Talk)(\]\])(\<\/span\>)/g,'$1$3$2');
myContent = myContent.replace(/\<font face\=\"Papyrus\" size\=\"4\">—\<span style\=\"cursor\:crosshair\"\>\[\[user\:Mono\|\<font color\=\"gold\"\>\'\'\'m\'\'\'\<\/font\>\<font color\=\"orange\"\>\'\'\'o\'\'\'\<\/font\>\<font color\=\"red\"\>\'\'\'n\'\'\'\<\/font\>\<font color\=\"purple\"\>\'\'\'o\'\'\'\]\]\<\/font\>\<\/span\>\<\/font\>/g,'<span style="font-family:Papyrus;font-size:large;">—<span style="cursor:crosshair">[[user:Mono|<span style="color:gold">\'\'\'m\'\'\'</span><span style="color:orange">\'\'\'o\'\'\'</span><span style="color:red">\'\'\'n\'\'\'</span><span style="color:purple">\'\'\'o\'\'\'</span>]]</span></span>');
myContent = myContent.replace(/\[\[User\:AKMask\|\<font color\=\"\#990011\"\>M\]\]\<\/font\>/g,'[[User:AKMask|<span style="color:#990011">M</span>]]');
myContent = myContent.replace(/\<sup\>\[\[User_talk\:AKMask\|\<font color\=\"\#990011\"\>ask\]\]\<\/font\>\<\/sup\>/g,'[[User_talk:AKMask|<sup style="color:#990011">ask</sup>]]');
myContent = myContent.replace(/(\<small\>\'\'\'\[\[User\:Carolmooredc\|Carolmooredc\]\] \(\[\[User talk\:Carolmooredc\|Talkie-Talkie\]\]\))(\<\/small\>)(\'\'\')/g,'$1$3$2');
myContent = myContent.replace(/(\[\[Special\:Contributions\/Zenswashbuckler\|\<font color\=\"\#000\"\>\.☠)(\]\])(\<\/font\>)/g,'$1$3$2');
myContent = myContent.replace(/(\<b\>\<font color\=\"\#FF0000\"\>♥)(\<\/b\>)(\<\/font\>)/g,'$1$3$2');
if(document.getElementById('wpTextbox1').value != myContent) {
if(document.getElementById('wpTextbox1').value != myContent) {
document.getElementById('wpTextbox1').value=myContent;
document.getElementById('wpSummary').value='Fix misnested tag [[Special:LintErrors/misnested-tag|lint errors]]';
document.getElementById('wpMinoredit').checked = true;
}
}
}
)}