Jump to content
Wikipedia The Free Encyclopedia

Wikipedia:WikiProject User scripts/Scripts/Quick cleanup

From Wikipedia, the free encyclopedia
 // <pre><nowiki>
 // &lt;nowiki&gt;If you are editing a page, click the cleanup button on your tab bar to add "{{cleanup|{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}" to the top, set "Marked for cleanup" as the edit summary, mark it as a minor edit, and submit.&lt;/nowiki&gt;

 functiondoQcleanup(){
 document.editform.wpTextbox1.value='{'+'{'+'cleanup|'+'{'+'{'+'subst:CURRENTMONTHNAME}} '+'{'+'{'+'subst:CURRENTYEAR}}}}\n\n'+document.editform.wpTextbox1.value;
 document.editform.wpSummary.value='Marked for cleanup';
 document.editform.wpMinoredit.checked=true;
 document.editform.submit();
 }

 $.when($.ready,mw.loader.using('mediawiki.util')).then(function(){
 if(mw.config.get('wgCanonicalNamespace')=="User"||mw.config.get('wgCanonicalNamespace')=="User_talk"){
 // wouldn't it make more sense to just check for mw.config.get('wgCanonicalNamespace') != "", or am I missing something?
 return;
 }
 if(document.editform){
 mw.util.addPortletLink("p-cactions","javascript:doQcleanup()","cleanup","ca-cleanup","Mark for cleanup","");
 }
 });

 // by [[User:Darkest Hour|Darkest Hour]]
 // </nowiki></pre>

AltStyle によって変換されたページ (->オリジナル) /