User:WOSlinkerBot/linttask19.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(/(\\[\[User\:Seadog\.M\.S\|\\'\'\'Seadog\'\'\')(\]\]\\[\[User talk\:Seadog\.M\.S\|Talk\]\]\<\/sup\>) *(\<\/font\>)/g,'$1$3$2'); myContent = myContent.replace(/(\\[\[User\:Seadog\.M\.S\|\\'\'\'Seadog\'\'\'\<\/font\>\]\]\\[\[User talk\:Seadog\.M\.S\|Talk\]\]\<\/sup\>)( \d\d\:\d\d)/g,'$1 $2');

myContent = myContent.replace(/(\ \[\[User\:Daisy18108\/Guestbook\|\Sign my Guestbook\!\<\/font\>)(\<\/sup\>)(\]\])/g,'$1$3$2');

myContent = myContent.replace(/(\Thank[ \w]*\. \<\!-- Template\:Huggle\/warn-\w*-\d --\>\<\!-- Template\:uw-\w*\d --\>\[\[User\:Donner60\|Donner60\]\] \(\[\[User talk\:Donner60\|talk\]\]\) \d\d\:\d\d\, \d* \w* \d\d\d\d\ \(UTC\))\n\:(\'\'If this is a \[\[Network address translation\|shared IP address\]\]\, and you did not make the edits\, consider \[\[Wikipedia\:Why create an account\?\|creating an account\]\] for yourself so you can avoid further irrelevant notices\.\'\'\<\!-- Template\:Shared IP advice --\>\<\/del\>)/g,'$1 \n: $2'); myContent = myContent.replace(/(\Thank[ \w]*\. \<\!-- Template\:Huggle\/warn-\w*-\d --\>\<\!-- Template\:uw-\w*\d --\>\[\[User\:Donner60\|Donner60\]\] \(\[\[User talk\:Donner60\|talk\]\]\) \d\d\:\d\d\, \d* \w* \d\d\d\d\ \(UTC\))\n\:(\'\'If this is a \[\[Network address translation\|shared IP address\]\]\, and you did not make the edits\, consider \[\[Wikipedia\:Why create an account\?\|creating an account\]\] for yourself or \[\[Special\:UserLogin\|logging in with an existing account\]\] so you can avoid further irrelevant notices\.\'\'\<\!-- Template\:Shared IP advice --\>\<\/del\>)/g,'$1 \n: $2');

myContent = myContent.replace(/\\[\[Special\:Contributions\/Demi\|C\]\]\<\/sup\>/g,'C');

myContent = myContent.replace(/\\[\[Ricers\|lol\<\/sup\>\]\]/g,'lol'); myContent = myContent.replace(/\\[\[User talk\:Why sigh\, cutie pie\?\|Refill\<\/sup\>\]\]/g,'Refill');

myContent = myContent.replace(/\\[\[User\:Empyrycal\|E\<\/sup\>\]\]/g,'E');

myContent = myContent.replace(/(\)\n(\\n)(This monthly newsletter showcases the Wikipedia Education Program\. It focuses on sharing\: your ideas\, stories\, success and challenges\. Be sure to check out the \[\[outreach\:Education\/Newsletter\/\w*_\d*\|full version\]\]\, and \[\[Outreach\:Education\/Newsletter\/Archives\|past editions\]\]\. You can also volunteer to help publish the newsletter\. \[\[Outreach\:Education\/News\/Team\|Join the team\!\]\]\<\/span\>\n\<\/center\>)/g,'$2$1$3'); myContent = myContent.replace(/(\\n\)\n(\{\{anchor\|back\}\} *)\n(\In This Issue) *(\n\<\/center\>)/g,'$1$2$3 $4'); myContent = myContent.replace(/(\|\<span style\=\"font-size\:16px\; font-family\:times new roman\"\>)\n\n(\[\[Outreach\:Education\/Newsletter\/\w* \d*\/Mobile Learning Week 2017\|Mobile Learning Week 2017\]\])\n(\<\/span\>\n)\<\/span\>\n/g,'$1$2$3');

myContent = myContent.replace(/(\<center\>\<span style\=\"font-family\: Arial\; font-size\: 12pt\"\>\<font size\=\"18\"\>\'\'\'\[\[Wikipedia\:WikiProject Nigeria\]\]\'\'\')(\<\/center\>)(\<\/font\>\<\/span\>)/g,'$1$3$2'); myContent = myContent.replace(/(\<u\>\'\'Welcoming New Volunteers\'\' \<\/u\>) \'\'\n/g,'$1\n');

myContent = myContent.replace(/(\<sup\>\[\[User_talk\:Bloodpack\| \<font color\=\"red\"\> \'\'argh\!\'\' \<\/font\>)(\<\/sup\>)(\]\])/g,'$1$3$2');

myContent = myContent.replace(/(\<div class\=\"user-block\"\>\[\[Image\:Stop_x_nuvola\.svg\|left\|35px\]\])\<span style\=\"font-size\: 105\%\;\"\>(Your account has been \'\'\'blocked indefinitely\'\'\' from editing Wikipedia because your username)/g,'$1$2');

myContent = myContent.replace(/(\<sup\>\[\[User talk\:methecooldude\|T\]\])\n/g,'$1 \n');

myContent = myContent.replace(/(\<sup\>\'\'\[\[Special:Contributions\/Journalist\|C\.\]\]\/\[\[User talk\:Journalist\|Holla \@ me\]\]\'\')\<sup\>/g,'$1 '); myContent = myContent.replace(/(\<sup\>\'\'\' \'\'\[\[Special\:Contributions\/Journalist\|\<sup\>\<span style\=\"color\:lime\"\>C\.\]\]\[\[Image\:Smilie\.gif\|30px\]\] \[\[User talk\:Journalist\|\<sup\>\<span style\=\"color\:lightseagreen\"\> Holla \@ me\!\]\]\'\' \'\'\')\<sup\>/g,'$1 ');

myContent = myContent.replace(/\{\{col-begin\}\}\n\n(\'\'Welcome\!\'\'\&nbsp\;My name is \[\[User\:)/g,'$1'); myContent = myContent.replace(/(\(UTC\)\n)\{\{col-end\}\}\n\<\/div\>\n(\|-\n\<\!-- ROW 1 --\>\n\<\!-- LEFT COLUMN --\>)/g,'$1$2');

myContent = myContent.replace(/\<span style\=\"cursor\:crosshair\;color\:green\"\>\n(\*\'\'\'\[\[Wikipedia)/g,'$1');

myContent = myContent.replace(/\]\](\<\/font\> \<sub\>)(\(spell my name backwards\)\'\'\' at\<\/sub\>)/g,']]\'\'\'$1\'\'\'$2');

myContent = myContent.replace(/(\[\[User_talk\:Fusionmix\|\<span style\=\"padding\:0px\;\"\>\<font style\=\"color\:\#000000\;background\:white\;\"\>\'\'\'It\'\'\'\<\/font\>)(\]\])/g,'$1 $2'); myContent = myContent.replace(/(\]\]\<span style\=\"padding\:0px\;\"\>\<font style\=\"color\:white\;background\:\#000000\;\"\>\'\'\'Up\'\'\'\<\/font\>\<\/span\>)(\<\/small\>)/g,'$1 $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 lint errors'; document.getElementById('wpMinoredit').checked = true; }         }

} )}