User:Casper2k3/Javascript/artnoticebutton.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:Casper2k3/Javascript/artnoticebutton. |
// <nowiki>
function doHoax(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Tagging article as a possible hoax - Please wait...</h2>';
doTag('hoax', '', 'Article is a suspected hoax');
};
function doInUse(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Tagging article as in use - Please wait...</h2>';
doTag('inuse', '', 'Article is in use');
};
function doCleanup(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Tagging article as needing cleanup - Please wait...</h2>';
doTag('cleanup-date', '|'+month+' '+year, 'Article is in need of cleanup');
};
function doArticle(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Tagging article as sounding like an advert - Please wait...</h2>';
doTag('advert', '', 'Article sounds like an advert');
};
function doNotEnglish(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Tagging article as needing translation - Please wait...</h2>';
doTag('notenglish', '', 'Article needs translation');
};
function doTag(tag, exInfo, reason){
document.location = document.URL + "?action=edit&autoedit=s/^/\n{{" + tag + exInfo + "}}\n/&autosummary=" + reason + " by [[User:Casper2k3|Casper2k3]] ([[WP:RCP]])&autoclick=wpSave";
};
function artNoticeButton(){
document.getElementById('jsArticleMessageBox').innerHTML = '<div style="background-color:yellow; -moz-border-radius:15px;"> <a href="javascript:doHoax()"><font color="#0000FF">Hoax</font></a> - <a href="javascript:doInUse()"><font color="#0000FF">In Use</font></a> - <a href="javascript:doCopyVio()"><font color="#0000FF">Copyvio</font></a> - <a href="javascript:doCleanup()"><font color="#0000FF">Cleanup</font></a> - <a href="javascript:doAdvert()"><font color="#0000FF">Advert</font></a> - <a href="javascript:doNotEnglish()"><font color="#0000FF">Not English</font></a></div>';
};
// </nowiki>