User:WOSlinkerBot/linttask18.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(/\\n\:\([\w\d •,]*)\<\/center\>\<\/span\>/gi,'$1 ');

myContent = myContent.replace(/\\[\[User\:Thehotwheelsguy99\/Guestbook\|Sign\!\!\<\/sub\>\]\]/g,'Sign!!');

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

myContent = myContent.replace(/\\n\* Czech Republic\:)/g,'\n\* Albania\:)/g,'\n\* Australia\:)/g,'/g,'$1 ');          myContent = myContent.replace(/(\* Wales\: \[\[2017-18 Welsh Premier Women\'s Football League\]\] ends May 18 *\n)\<\/span\>/g,'$1 ');          myContent = myContent.replace(/(\* United States\: \[\[20\d\d National Women\'s Soccer League season\]\] *\n)\<\/span\>/g,'$1 ');          myContent = myContent.replace(/(\)\n(\[\[WP\:GNG\]\] takes precedence over \[\[WP\:NFOOTY\]\])/g,'$1$2');

myContent = myContent.replace(/\[\[Commons\:User\:ShakataGaNai\|\\'\'\'S\'\'\'hakata\'\'\'\<\/span\>\G\'\'\'a\<\/span\>\\'\'\'N\'\'\'ai\<\/span\>\]\]/g,' \'\'\'S\'\'\'hakata \'\'\'G\'\'\'a \'\'\'N\'\'\'ai ');

myContent = myContent.replace(/(\ \[\[User talk\:Barberio\|talk\]\]\, \[\[Special\:Contributions\/Barberio\|contribs\]\] )\<\/sub\>/g,'$1 ');

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

myContent = myContent.replace(/\<font face\=\"Nasalization\" color\=\"\#003300\"\>\[\[User\:Tennekis\|Tennekis\]\]\<\/font\>/g,' Tennekis '); myContent = myContent.replace(/\<sup\>\[\[User talk\:Tennekis\|\(rant\)\<\/sup\>\]\]/g,'(rant)');

myContent = myContent.replace(/\<font color\=\"black\"\>\'\'\'\[\[User\:Ed\!\|Ed\!\]\]\<\/font\>\<sup\>\<font color\=\"black\"\>\[\[User talk\:Ed\!\|\(talk\)\]\]\'\'\'\<\/font\>\<\/sup\>/g,'\'\'\' Ed! (talk)\'\'\'');

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; }         }

} )}