Jump to content

User:Limideen/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var month=mydate.getMonth()
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var final="== "+montharray[month]+" "+year+" =="

importScript('User:Limideen/lupin.js')
importScript("User:Topaz/init.js");
importScript("User:Topaz/util.js");
importScript("User:Topaz/comm.js");
importScript("User:Topaz/wputil.js");
importScript("Special:Mypage/statuschanger.js");
importScript('User:AzaToth/twinkle.js');
importScript('User:Ale_jrb/Scripts/igloo.js'); // [[User:Ale_jrb/Scripts/igloo]]

/*
* I have copied this source so I can customize it!
* Usage :Include a call to <code>addForceSummary()</code> in your page load function</s>
* Possible improvements :Make any form submission force a summary. Note that requiring an edit summary on preview or diff is not useful since "save" still needs to gain focus or be clicked before a commit can occur.
 
A heavily modified and expanded version of this code is now in use across the entire [[SourceWatch]] wiki. Here's a [http://www.sourcewatch.org/index.php?title=MediaWiki:Monobook.js#Edit_summary_stuff direct link to the code]. A particular enhancement in the SourceWatch code is that it provides a dropdown next to the edit summary textfield containing common edit summaries. Selecting one of these automatically inserts that summary into the textfield. The code also examines which subproject of SourceWatch the page belongs to, and adds an appropriate prefix to the edit summary.
 
<source lang=javascript> */
 

/*split user warnings and deletions <nowiki>*/
 
function getUserName() {
  switch (wgCanonicalNamespace) {
    case 'User': 
/*<![CDATA[*/
addButton('http://upload.wikimedia.org/wikipedia/commons/3/33/Button_exclamation.png','delete your own user page','{{','}}','subst:user:flyingidiot/2','mw-editbutton-media');
/*]]>*/;
break
case 'User_talk': 
/*<![CDATA[*/
addButton('http://upload.wikimedia.org/wikipedia/commons/4/48/Crystal_Clear_app_date.png','Month and Year Section',final,'','');
addButton('http://upload.wikimedia.org/wikipedia/commons/8/84/Warn3.png','Warning for Vandalism','{{subst:uw-vandalism3}} ~~~~','','');
addButton('http://upload.wikimedia.org/wikipedia/commons/b/bd/Warn4.png','Final Warning for Vandalism','{{subst:uw-vandalism4}} ~~~~','','');
addButton('http://upload.wikimedia.org/wikipedia/commons/7/72/Testwarn3.png','Warning for Testing','{{subst:uw-test3}} ~~~~','','');
addButton('http://upload.wikimedia.org/wikipedia/commons/9/9d/Testwarn4.png','Final Warning for Testing','{{subst:uw-test4}} ~~~~','','');
addButton('http://upload.wikimedia.org/wikipedia/commons/0/07/Deletewarn3.png','Warning for Deleting Content','{{subst:uw-delete3}} ~~~~','','');
addButton('http://upload.wikimedia.org/wikipedia/commons/f/f4/Deletewarn4.png','Final Warning for Deleting Content','{{subst:uw-delete4}} ~~~~','','');
addButton('http://upload.wikimedia.org/wikipedia/commons/0/09/Warncreate3.png','Warning for Creating Nonsense Pages','{{subst:uw-create3}} ~~~~','','');
addButton('http://upload.wikimedia.org/wikipedia/commons/0/00/Warncreate4.png','Final Warning for Creating Nonsense Pages','{{subst:uw-create4}} ~~~~','','');
addButton('http://upload.wikimedia.org/wikipedia/commons/0/02/Spam3.png','Warning for Adding Links','{{subst:uw-spam3}} ~~~~','','');
addButton('http://upload.wikimedia.org/wikipedia/commons/f/fb/Spam4.png','Final Warning for Adding Links','{{subst:uw-spam4}} ~~~~','','');
break
    default:
/*<![CDATA[*/
addButton('http://upload.wikimedia.org/wikipedia/commons/3/33/Button_exclamation.png','FIdeletion','{{user:Flyingidiot/del|','}}','|','mw-editbutton-media');
addButton('http://upload.wikimedia.org/wikipedia/commons/3/3d/ButtonSpam.png','Delete spam','{{','}}','Db-spam','mw-editbutton-bold');
addButton('http://upload.wikimedia.org/wikipedia/commons/c/ca/NonsenseDelete.png','Delete nonsense','{{','}}','Db-nonsense','mw-editbutton-italic');
addButton('http://upload.wikimedia.org/wikipedia/commons/2/28/Nonnotable.png','Delete unnotable','{{','}}','db-bio','mw-editbutton-link');
addButton('http://upload.wikimedia.org/wikipedia/commons/6/62/Button_stop.png','Delete for a special reason','{{db','}}','|','Reason','mw-editbutton-extlink');
addButton('http://upload.wikimedia.org/wikipedia/commons/e/e2/Button_contexto.png','Delete empty or no context','{{','}}','db-nocontext','mw-editbutton-headline');
addButton('http://upload.wikimedia.org/wikipedia/commons/3/3b/Button_crocs.png','Delete attack page','{{','}}','db-attack','mw-editbutton-image');
addButton('http://upload.wikimedia.org/wikipedia/commons/c/cc/Bouton_Vandale2.png','Delete blanked','{{','}}','db-blankcsd','mw-editbutton-image');
addButton('http://commons.wikimedia.org/wiki/Image:Wiki_test.GIF','Delete test','{{','}}','db-test','mw-editbutton-image');
addButton('http://upload.wikimedia.org/wikipedia/commons/6/62/Button_desambig.png','Disambiguate the page','{{disambig','}}','','mw-editbutton-hr');
/*]]>*/;
  }
}
$(getUserName());
/* </source> */