User:Спартанец/monobook.js

// function addForceSummary {   if(!/&action=edit/.test(window.location.href) && !/&action=submit/.test(window.location.href)) return; if(/&section=new/.test(window.location.href)) return; if(!document.forms.editform) return; document.forms.editform.wpSave.onclick = forceSummary; // The second invocation of this will cause extra annoyance if there is no edit summary present. If there *is* an edit summary, the dialog box will not appear. document.forms.editform.wpSave.onfocus = forceSummary; } function forceSummary {   if(!document.forms.editform.wpSummary.value.replace(/^(?:\/\\*.*\\*\/)? *(.*) *$/,'$1'))   {        var r = prompt('Are you sure you want to submit without adding a summary?\nTo add a summary, type it in the box below:','(fi)'); if(r == null) { return false; } document.forms.editform.wpSummary.value = r;   } return true; } addOnloadHook(addForceSummary); /*split user warnings and deletions */ 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/f/fc/Important-2.svg','autobio',,,'Article','mw-editbutton-media'); addButton('http://upload.wikimedia.org/wikipedia/commons/4/44/Warn1.png','First User Warning Vandal',,,'Article','mw-editbutton-media'); addButton('http://upload.wikimedia.org/wikipedia/commons/e/e4/Warn2.png','Second User Warning Vandal',,,'article','mw-editbutton-math'); addButton('http://upload.wikimedia.org/wikipedia/commons/8/84/Warn3.png','Third User Warning Vandal',,,'Article','mw-editbutton-nowiki'); addButton('http://upload.wikimedia.org/wikipedia/commons/b/bd/Warn4.png','Final User Warning Vandal',,,'article','mw-editbutton-nowiki'); addButton('http://upload.wikimedia.org/wikipedia/commons/7/76/Testwarn1.png','testpage userwarn 1',,,'Article','mw-editbutton-signature'); addButton('http://upload.wikimedia.org/wikipedia/commons/0/03/Testwarn2.png','testpage userwarn 2',,,'Article','mw-editbutton-signature'); addButton('http://upload.wikimedia.org/wikipedia/commons/7/72/Testwarn3.png','testpage userwarn 3',,,'Article','mw-editbutton-signature'); addButton('http://upload.wikimedia.org/wikipedia/commons/9/9d/Testwarn4.png','testpage userwarn 4',,,'Article','mw-editbutton-signature'); addButton('http://upload.wikimedia.org/wikipedia/commons/4/48/Deletewarn1.png','Userwarn delete 1',,,'Article','mw-editbutton-table'); addButton('http://upload.wikimedia.org/wikipedia/commons/7/7d/Deletewarn2.png','Userwarn delete 2',,,'Article','mw-editbutton-table'); addButton('http://upload.wikimedia.org/wikipedia/commons/0/07/Deletewarn3.png','Userwarn delete 3',,,'Article','mw-editbutton-table'); addButton('http://upload.wikimedia.org/wikipedia/commons/f/f4/Deletewarn4.png','Userwarn delete 4',,,'Article','mw-editbutton-table'); addButton('http://upload.wikimedia.org/wikipedia/commons/c/cd/Warncreate1.png','Userwarn create nonsense 1',,,'Article','mw-editbutton-table'); addButton('http://upload.wikimedia.org/wikipedia/commons/0/01/Warncreate2.png','Userwarn create nonsense 2',,,'Article','mw-editbutton-table'); addButton('http://upload.wikimedia.org/wikipedia/commons/0/09/Warncreate3.png','Userwarn create nonsense 3',,,'Article','mw-editbutton-link'); addButton('http://upload.wikimedia.org/wikipedia/commons/0/00/Warncreate4.png','Userwarn create nonsense 4',,,'Article','mw-editbutton-link');/*]]>*/; addButton('http://upload.wikimedia.org/wikipedia/commons/a/a4/Spam1.png','spam userwarn 1',,,'Article','mw-editbutton-signature'); addButton('http://upload.wikimedia.org/wikipedia/commons/2/27/Spam2.png','spam userwarn 2',,,'Article','mw-editbutton-signature'); addButton('http://upload.wikimedia.org/wikipedia/commons/0/02/Spam3.png','spam userwarn 3',,,'Article','mw-editbutton-signature'); addButton('http://upload.wikimedia.org/wikipedia/commons/f/fb/Spam4.png','spam userwarn 4',,,'Article','mw-editbutton-signature'); break default: /*<![CDATA[*/ addButton('http://upload.wikimedia.org/wikipedia/commons/3/33/Button_exclamation.png','FIdeletion','','|','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','','|','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',,,'mw-editbutton-hr'); /*]]>*/; } } addOnloadHook(getUserName); //