User:Higgs1/common.js

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

if ( !$( '#ca-purge' ).length && mw.config.get( 'wgIsArticle' ) ) { 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    ); }

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") {

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'    ); }