User:WOSlinkerBot/linttask20.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(/(\'\'\')(\\)([1-9]* new members\!\'\'\'\<\/u\>\<\/center\>)/g,'$2$1$3');

myContent = myContent.replace(/(\)\n(\'\'\'The \[\[Wikipedia\:WikiCup\|WikiCup\]\] Newsletter\'\'\'\<\/big\>)/g,'$1$2'); myContent = myContent.replace(/(\)\n(\'\'\'The \[\[User\:Garden\/WikiCup\|WikiCup\]\] Newsletter\'\'\'\<\/big\>)/g,'$1$2'); myContent = myContent.replace(/(\[\[User_talk\:IMatthew\|\\talk\<\/sup\>)(\]\])/g,'$1 $2'); myContent = myContent.replace(/(and \[\[User\:Thehelpfulone\|\\'\'\'The\'\'\'\<\/font\>\]\]\[\[User_talk\:Thehelpfulone\|\ \'\'\'Helpful\'\'\'\<\/font\>\]\]\[\[Special\:Contributions\/Thehelpfulone\|\ \'\'\'One\'\'\'\<\/font\>\]\]) *\<\/span\>\<\/font\>/g,'$1');

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

myContent = myContent.replace(/\[\[Wikipedia\:Esperanza\|\E\]\]\<\/font\>/g,' E '); myContent = myContent.replace(/\[\[Wikipedia\:Esperanza\|\e\]\]\<\/font\>/g,' e '); myContent = myContent.replace(/\[\[Wikipedia\:Esperanza\|\\'\'\'e\'\'\'\]\]\<\/font\>/g,' \'\'\'e\'\'\' ');

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

myContent = myContent.replace(/\[\[User\:Master_son\|\\'\'\'master\<\/span\>\ son\'\'\'\<\/span\>\]\]/g,'\'\'\'\ master son \'\'\'\');

myContent = myContent.replace(/(\'\'\'\[\[User\:Martinphi\|\<span style\=\"color\:\#6c4408\;border\:1px dashed \#6c4408\;padding\:1px\;background\:\#ffffff\;\"\>Martin\<sup\>phi\<\/sup\>)(\]\]\'\'\')(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[Special\:Contributions\/Two_Hearted_River\|\<font color\=\"firebrick\"\>fish)(\]\])(\<\/font\>)/g,'$1$3$2');

myContent = myContent.replace(/\<span style\=\"background\:\#006B54\; padding\:2px\"\>\'\'\'\[\[User\:Dough4872\|\<font color\=\"white\"\>Dough\<\/font\>\]\]\<\/span\>\<span style\=\"background\: \#FFD200\; padding\:2px\"\>\[\[User talk\:Dough4872\|\<font color\=\"black\"\>4872\<\/font\>\]\]\'\'\'\<\/span\>/g,'\'\'\' Dough   4872  \'\'\'');

myContent = myContent.replace(/(\<sub\>\[\[User talk\:FrB\.TG\|\<font color\=\"\#6E7F80\"\>talk\<\/font\>\]\])(\'\'\')(\<\/sub\>)/g,'$1$3$2');

myContent = myContent.replace(/(\[\[User\:Victor Lopes\|\<span style\=\"color\:black\"\>\'\'\'Victão Lopes\'\'\')(\]\])(\<\/span\>)/g,'$1$3$2');

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

myContent = myContent.replace(/(\'\'\'\'\'\[\[User\:TLSuda\|\<span style\=\"color\:\#886699\"\>TLSuda)(\]\]\'\'\'\'\')(\<\/span\>)/g,'$1$3$2');

myContent = myContent.replace(/(\'\'\[\[User\:JL 09\|\<span style\=\"color\:\#0070FF\;cursor\:move\;\"\>JL 09)(\]\]\'\')(\<\/span\>)/g,'$1$3$2'); myContent = myContent.replace(/(\<sub\>\'\'\[\[Special\:Contributions\/JL_09\|\<sub style\=\"color\:\#177245\;cursor\:help\;\"\>c\<\/sub\>\]\])(\<\/sub\>)(\'\')/g,'$1$3$2');

myContent = myContent.replace(/\[\[User\:Cliff smith\|\<font color\=\"blue\"\>\'\'\'\<font face\=\"georgia\"\>Cliff\'\'\' smith\<\/font\>\<\/font\>\]\]/g,' \'\'\'Cliff\'\'\' smith '); myContent = myContent.replace(/\[\[User talk\:Cliff smith\|\'\'\<font color\=\"black\"\>\<sup\>talk\<\/sup\>\<\/font\>\'\'\]\]/g,'\'\'<sup style="color:black;">talk \'\'');

myContent = myContent.replace(/(\<span style\=\"white-space\:nowrap\;\"\>)(\'\'\')(\~ \[ \[\[User\:ScottMHoward\|\<font color\=\"\#004400\"\>Scott M\. Howard\<\/font\>\]\] \] \~ \<\/span\>\<span style\=\"white-space\:nowrap\;\"\>\[ \[\[User talk\:ScottMHoward\|\<font color\=\"\#004400\"\>Talk\<\/font\>\]\] \]\:\[ \[\[Special\:Contributions\/ScottMHoward\|\<font color\=\"\#004400\"\>Contribs\<\/font\>\]\] \] \~)(\'\'\')(\<\/span\>)/g,'$2$1$3$5$4');

myContent = myContent.replace(/\[\[User\:Spinningspark\|\<font style\=\"background\:\#FFF090\;color\:\#00C000\"\>\'\'\'Sp\<font style\=\"background\:\#FFF0A0\;color\:\#80C000\"\>in\<font style\=\"color\:\#C08000\"\>ni\<\/font\>\<\/font\>\<font style\=\"color\:\#C00000\"\>ng\<\/font\>\<\/font\>\<font style\=\"color\:\#2820F0\"\>Spark\'\'\'\<\/font\>\]\]/g,'\'\'\' Sp in ni ng  Spark \'\'\''); myContent = myContent.replace(/\[\[User\:Spinningspark\|\<font style\=\"background\:\#FFF090\;color\:\#00C000\"\>\'\'\'Sp\<font style\=\"background\:\#FFF0A0\;color\:\#80C000\"\>in\<font style\=\"color\:\#C08000\"\>ni\<\/font\>\<\/font\>\<font style\=\"color\:\#C00000\"\>ng\<\/font\>\<\/font\>\<font style\=\"color\:\#2820F0\"\>Spark\<\/font\>\'\'\'\]\]/g,'\'\'\' Sp in ni ng  Spark \'\'\'');

myContent = myContent.replace(/\[\[User\:Nordic Dragon\|\<font color\=\"White\"\>\'\'\'Nordic\'\'\'\]\]\<\/font\>/g,' \'\'\'Nordic\'\'\' '); myContent = myContent.replace(/\[\[User talk\:Nordic Dragon\|\<font color\=\"Black\"\>\'\'\'Dragon\'\'\'\]\]\<\/font\>/g,' \'\'\'Dragon\'\'\' ');

myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the debate\. )\<font color\=red\>(\'\'\'Please do not modify it\.\'\'\')\<\/font\>( Subsequent comments should be made on the appropriate discussion page \(such as the article\'s talk page or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this page\.)(\<\/div\>)/g,'$1<span style="color:red\">$2 $3\'\'$4'); myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the debate\. \<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made on the appropriate discussion page \(such as the \w*\'s talk page or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this page\.)(\<\/div\>)/g,'$1\'\'$2'); myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the debate\. \<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made on the appropriate discussion page \(such as the \w*\'s \[\[Help\:Using talk pages\|talk page\]\] or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this page\.)(\<\/div\>)/g,'$1\'\'$2');

myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the debate\. \<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made on the appropriate discussion page \(such as the article\'s talk page or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this page\.)( \<\!\-\-Template\:Afd bottom\-\-\>\<\/div\>)/g,'$1\'\'$2'); myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the debate\. \<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made on the appropriate discussion page \(such as the article\'s \[\[Help\:Using talk pages\|talk page\]\] or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this page\.)( \<\!\-\-Template\:Afd bottom\-\-\>\<\/div\>)/g,'$1\'\'$2'); myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the debate\. *\<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> No further edits should be made to this page\.)( \<\!\-\-Template\:Afd bottom\-\-\>\<\/div\>)/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; }         }

} )}