User:Casper2k3/Javascript/artnoticebutton.js

From Wikipedia, the free encyclopedia

If a message on your talk page led you here, please be wary of who left it. Code that you insert on this page could contain malicious content capable of compromising your account. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. If this is a .js page, the code will be executed when previewing the page.
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
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;">&nbsp;<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>';
};