User:Higgs1/common.js

mw.util.wikiScript = mw.util.wikiScript || function (str) { return mw.config.get("wgScriptPath") + "/" + (str || "index") + mw.config.get("wgScriptExtension") }

// Adds purge item in the menu on the right navigation bar. if ( !$( '#ca-purge' ).length ) { mw.util.addPortletLink(       'p-cactions',        mw.util.wikiScript + '?' + $.param({ title: mw.config.get( 'wgPageName' ), action: 'purge' }),        mw.config.get( 'skin' ) == 'vector' ? 'Purge' : '*',        'ca-purge',        'Purge the server cache of this page',        null    ); }

// Adds a credits tab in the right navigation bar. if ( !$( '#ca-credits' ).length ) { mw.util.addPortletLink(       'p-views',        mw.util.wikiScript + '?' + $.param({ title: mw.config.get( 'wgPageName' ), action: 'credits' }),        mw.config.get( 'skin' ) == 'vector' ? 'Credits' : '*',        'ca-credits',        '',        null,        '#ca-watch, #ca-unwatch'    ); if (mw.config.get("wgAction") == "credits") { $("#ca-credits").addClass("selected") } }

// Adds a render tab in the right navigation bar. if ( !$( '#ca-render' ).length ) { mw.util.addPortletLink(       'p-views',        mw.util.wikiScript + '?' + $.param({ title: mw.config.get( 'wgPageName' ), action: 'render' }),        mw.config.get( 'skin' ) == 'vector' ? 'Render' : '*',        'ca-render',        'Render mode',        null,        '#ca-watch, #ca-unwatch'    ); }

// Main page if ( mw.config.get( 'wgTitle' == 'Main Page') ){ $( '#ca-nstab-main a' ).text( mw.config.get( 'wgTitle' ) ); }