Difference between revisions 32882 and 33014 on nowikibooks

/** Extra toolbar options ****************************************************** <pre>
  *
  *  Description: UNDOCUMENTED
  *  Maintainers: [[User:MarkS]]?, [[User:Voice of All]], [[User:R. Koot]]
  */
 
 //This is a modified copy of a script by User:MarkS for extra features added by User:Voice of All.
 // This is based on the original code on Wikipedia:Tools/Editing tools
(contracted; show full)         }
     } catch(e) {
         // bailing out!
     }
 }
 
 
 if ( 
mw.config.get('wgTitle') == 'Hovedside' && ( mw.config.get('wgNamespaceNumber') == 0 || mw.config.get('wgNamespaceNumber') == 1 ) ) {
        addOnloadHookjQuery(document).ready( mainPageRenameNamespaceTab );
 }

function speedyTab() {
    if ( mw.config.get('wgUserGroups') && !window.disableSysopJS ) {
        for ( var g = 0; g < mw.config.get('wgUserGroups').length; ++g ) {
            if ( mw.config.get('wgUserGroups')[g] == "sysop" ) {
                importScript( "MediaWiki:HurtigSlett.js" );
                break;
            }
        }
    }
}
 
addOnloadHookjQuery(document).ready( speedyTab );

/** Modify standard toolbar options *******************************************
  *
  *  Description: UNDOCUMENTED
  *  Maintainers: [[:w:no:Bruker:Stigmj]]
  */
 
if (mw.config.get('wgAction') == 'edit' || mw.config.get('wgAction') == 'submit')
addOnloadHookjQuery(document).ready(function(){
 if (mwEditButtons.length < 10) return
 // signature-button
 mwEditButtons[9].tagOpen = '~~~~'
})