Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
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(/(\<span style\=\"font-family\: Verdana\"\>\[\[User\:Seadog\.M\.S\|\<font color\=\"Mediumblue\"\>\'\'\'Seadog\'\'\')(\]\]\<sup\>\[\[User talk\:Seadog\.M\.S\|Talk\]\]\<\/sup\>) *(\<\/font\>)/g,'$1$3$2');
          myContent = myContent.replace(/(\<span style\=\"font-family\: Verdana\"\>\[\[User\:Seadog\.M\.S\|\<font color\=\"Mediumblue\"\>\'\'\'Seadog\'\'\'\<\/font\>\]\]\<sup\>\[\[User talk\:Seadog\.M\.S\|Talk\]\]\<\/sup\>)( \d\d\:\d\d)/g,'$1</span>$2');

          myContent = myContent.replace(/(\<sup\> \[\[User\:Daisy18108\/Guestbook\|\<font color\=\"red\"\>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</del>\n:<del>$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</del>\n:<del>$2');

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

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

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

          myContent = myContent.replace(/(\<span style\=\"font-weight\: regular\; text-align\:center\; font-size\:14px\; font-family\: \'Helvetica Neue\'\, Helvetica\, Arial\, sans-serif\; display\:block\; width\:1000px\"\>)\n(\<center\>\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(/(\<center\>\n\<span style\=\"color\:white\; font-size\:24px\; font-family\:times new roman\; display\:block\;  background\:\#339966\; width\:800px\;\"\>)\n(\{\{anchor\|back\}\} *)\n(\In This Issue) *(\n\<\/center\>)/g,'$1$2$3</span>$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</sup>\n');

          myContent = myContent.replace(/(\<sup\>\'\'\[\[Special:Contributions\/Journalist\|C\.\]\]\/\[\[User talk\:Journalist\|Holla \@ me\]\]\'\')\<sup\>/g,'$1</sup>');
          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</sup>');

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

    }
)}