User:WOSlinkerBot/linttask10.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | Documentation for this user script can be added at User:WOSlinkerBot/linttask10. |
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(/(\:\'\'The above discussion is preserved as an archive of the debate\. \<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\>)( \<\!\-\-Template\:Rb\-\-\>\<\/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\.)(\<\!\-\- Template\:Rfd bottom \-\-\>\<\/div\>)/g,'$1\'\'$2');
myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the discussion\. \<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made on the appropriate discussion page\.)(\<\/div\>\<\/noinclude\>\<\!\-\- Template\:Rfd bottom \-\-\>)/g,'$1\'\'$2');
myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the discussion\. \<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made on the appropriate discussion page\.)(\<\/noinclude\>\<\/div\>\<\!\-\- Template\:Rfd bottom \-\-\>)/g,'$1\'\'$2');
myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the discussion\. \<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made on the appropriate discussion page\.)(\n\{\{\#ifeq\:\{\{FULLPAGENAME\}\}\|Wikipedia\:Redirects for discussion\|\{\{collapse bottom\}\}\|\}\}\<\/div\>\<\!\-\- Template\:Rfd bottom \-\-\>)/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\.)(\n\{\{\#ifeq\:\{\{FULLPAGENAME\}\}\|Wikipedia\:Redirects for discussion\|\{\{collapse bottom\}\}\|\}\}\<\/div\>\<\!\-\- Template\:Rfd bottom \-\-\>)/g,'$1\'\'$2');
myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the proposal\. \<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made in a new section on this talk page\. No further edits should be made to this section\.)(\<\/div\>\<\!\-\- Template\:pollbottom \-\-\>)/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 in a new section on this talk page\. No further edits should be made to this section\.)(\<\/div\>\<\!\-\- Template\:pollbottom \-\-\>)/g,'$1\'\'$2');
myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the \{\{\{type\|proposal\}\}\}\. \<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made in a new section on this talk page\. No further edits should be made to this section\.)(\<\/div\>\<\!\-\- Template\:pollbottom \-\-\>)/g,'$1\'\'$2');
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 in a new section on this talk page\. No further edits should be made to this section\.)(\<\/div\>\<\!\-\- Template:pollbottom \-\-\>)/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');
myContent = myContent.replace(/(\:\'\'The above consensus 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 media\'s talk page\)\. No further edits should be made to this section\.)( \<\!\-\-Template\:Ffd 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 media\'s \[\[Help\:Using talk pages\|talk page\]\] or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this section\.)( \<\!\-\-Template\:Ffd 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 media\'s talk page or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this section\.)( \<\!\-\-Template\:Ffd 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 media\'s talk page or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this section\.)( \<\!\-\-Template\:Ifd 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 talk page or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this page\.)( \<\!\-\-Template\:Ifd bottom\-\-\>\<\/div\>)/g,'$1\'\'$2');
myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of a \[\[WP\:RM\|requested move\]\]\. *\<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made in a new section on this talk page or in a \[\[WP\:move review\|move review\]\]\. No further edits should be made to this section\.)(\<\/div\>\<\!\-\- Template\:RM bottom \-\-\>)/g,'$1\'\'$2');
myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of a \[\[WP\:RM\|requested move\]\]\. *\<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made in a new section on this talk page\. No further edits should be made to this section\.)(\<\/div\>\<\!\-\- Template\:RM bottom \-\-\>)/g,'$1\'\'$2');
myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of a \[\[Wikipedia\:Requested moves\|requested move\]\]\. *\<span style\=\"color\:red\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made in a new section on this talk page or in a \[\[Wikipedia\:Move review\|move review\]\]\. No further edits should be made to this section\.)(\<\/div\>\<\!\-\- Template\:RM bottom \-\-\>)/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 template\'s talk page or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this section\.)(\<\/div\>)/g,'$1\'\'$2');
myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the debate\. \<span style\=\"color\:Brown\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made on the appropriate discussion page \(such as the images\'s talk page or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this page\.)( \<\!\-\-Template\:Puf bottom\-\-\>\<\/div\>)/g,'$1\'\'$2');
myContent = myContent.replace(/(\:\'\'The above discussion is preserved as an archive of the debate\. \<span style\=\"color\:Brown\"\>\'\'\'Please do not modify it\.\'\'\'\<\/span\> Subsequent comments should be made on the appropriate discussion page \(such as the images\'s talk page or in a \[\[Wikipedia\:Deletion review\|deletion review\]\]\)\. No further edits should be made to this page\.)( \<\!--Template\:Pui 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='add missing italics in discussion close to reduce [[Special:LintErrors|lint errors]]';
document.getElementById('wpMinoredit').checked = true;
}
}
}
)}