User:Casper2k3/Javascript/artnoticebutton.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.
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>'; };