User:WOSlinkerBot/linttask16.js

function lint_queryString(p) { var re = RegExp('[&?]' + p + '=([^&]*)'); var matches; if (matches = re.exec(document.location)) { tr

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\{\|(\n\*Check out some of these pages\:\n)/gi,'$1');
          myContent = myContent.replace(/(\|Things to work on at Wikipedia\]\])\n\|\}(\n*\*If you have a question)/gi,'$1$2');
          myContent = myContent.replace(/(\|Manual of Style\]\])\n\|\}(\n*\*If you have a question)/gi,'$1$2');

          myContent = myContent.replace(/\nv(\{\{Episode list\n)/gi,'$1');

          myContent = myContent.replace(/\<table\>(\<small\> Created by \[\[Sahibdin\]\] and nominated for Featured Media by \{\{noping\|TheMandarin\}\} \<\/small\>)\<\/table\>/gi,'$1');
          myContent = myContent.replace(/\<center\>\<span style\=\"font-family\: Arial\; font-size\: 12pt\"\>\<font size\=\"18\"\>(WikiProject India)\<\/center\>\<\/font\>\<\/span\>/gi,'<center><span style="font-family:Arial; font-size:xxx-large;">$1</span></center>');
          myContent = myContent.replace(/(opt-out of future mailings\.<\/small>\}\}\n<\/div>\n)<\/div>(--\[\[User\:MediaWiki message delivery\|MediaWiki message delivery\]\])/gi,'$1$2');

          myContent = myContent.replace(/\<table\>(\<small\> Created by \{\{noping\|Bellus Delphina\}\} \<\/small\>)\<\/table\>/gi,'$1');
          myContent = myContent.replace(/\<center\>\<span style\=\"font-family\: Arial\; font-size\: 12pt\"\>\<font size\=\"18\"\>(WikiProject India)\<\/font\>\<\/span\>\<\/center\>/gi,'<center><span style="font-family:Arial; font-size:xxx-large;">$1</span></center>');

          myContent = myContent.replace(/(\=\= You are Invited to Bangla Wikipedia Photography Contest 2014\! \=\=\n*)\{\| width\=\"100\%\" cellpadding\=\"2\" cellspacing\=\"5\"\n(\<div style)/gi,'$1$2');
          myContent = myContent.replace(/(\(UTC\)\<\/small\>\n)\|\}\n(\<\/div\>\n)/gi,'$1$2');

          myContent = myContent.replace(/\<table width\=\"450\" border\=\"0\" cellspacing\=\"0\" cellpadding\=\"0\" align\=\"center\"\>\n(\<div style\=\"font-family\:Lancelot\;font-size\:80px\;color\:#ffffff\;text-align\:center\;\"\> \<p\>\{\{underline\|\'\'\'\<big\>I\<\/big\>CHTHUS\'\'\'\}\}\<\/p\>\<\/div\>\n)\<\/table\>/gi,'$1');
          myContent = myContent.replace(/\<table width\=\"450\" border\=\"0\" cellspacing\=\"0\" cellpadding\=\"0\" align\=\"center\"\>\n(\<center\>\n\<span style\=\"font-family\: Bebas Neue \; color\:\#ffffff\; font-size\:56pt\;text-align\:center\;\"\><p\>\{\{underline\|\'\'\'\<big\>I\<\/big\>CHTHUS\'\'\'\}\}\<\/p\>\<\/span\>\<\/center\>\n)\<\/table\>/gi,'$1');
          myContent = myContent.replace(/(which drives a wedge into the world of false assurances\.\")(<br>\n)(~ \[\[Jacques Ellul\]\]\'\'\'<\/div>)/gi,'$1\'\'\'$2\'\'\'$3');
          myContent = myContent.replace(/(and may it be sprinkled with love and friendship\.\'\')(<br>\n\'\'\'\'\'Best Wishes\!)/gi,'$1\'\'\'$2');

          myContent = myContent.replace(/\{\| \|- \|\n(\[\[File\:Nuvola apps edu mathematics blue-p\.svg)/gi,'{|\n|$1');

          myContent = myContent.replace(/(\<code\>)\n(\<nowiki\>\=\=References\=\=\<\/nowiki\>)(\n\<br \/\>\n)(\<nowiki\>\{\{Reflist\}\}\<\/nowiki\>)\n(\<\/code\>)/gi,'$1$2$5$3$1$4$5');
          myContent = myContent.replace(/(\<code\>)\n(\<nowiki\>\{\{Refbegin\}\}\<\/nowiki\>)(\n\<br \/\>\n)(\<nowiki\>\*Press paste \(Ctrl\+V or Apple\+V\) after this asterisk, then remove the \<ref\>\<\/ref\> tags\<\/nowiki\>)\n\<br \/\>\n(\<nowiki\>\{\{Refend\}\}\<\/nowiki\>)\n(\<\/code\>)\}\}/gi,'$1$2$6$3$1$4$6$3$1$5$6\n}}');

          if(document.getElementById('wpTextbox1').value != myContent) {

              if(document.getElementById('wpTextbox1').value != myContent) {
                  document.getElementById('wpTextbox1').value=myContent;
                  document.getElementById('wpSummary').value='Fix fostered content [[Special:LintErrors/fostered|lint errors]]';
                  document.getElementById('wpMinoredit').checked = true;
              }
          }

    }
)}

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.