Jump to content

MediaWiki:Common.js: Difference between revisions

From VeraciaWiki
Created page with "Any JavaScript here will be loaded for all users on every page load.: var conf = mw.config.get([ 'wgCanonicalNamespace', 'wgTitle', 'wgPageName' ]); // Only do the following on the Project:Sandbox page. if ( conf.wgCanonicalNamespace === 'Project' && conf.wgTitle == 'Sandbox' ) { // Add a link to the actions menu to Special:Log for this page. mw.loader.using( 'mediawiki.util', function () { mw.util.addPortletLink( 'p-caction..."
 
Blanked the page
Tag: Blanking
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */


var conf = mw.config.get([
    'wgCanonicalNamespace',
    'wgTitle',
    'wgPageName'
]);
// Only do the following on the Project:Sandbox page.
if ( conf.wgCanonicalNamespace === 'Project' && conf.wgTitle == 'Sandbox' ) {
    // Add a link to the actions menu to Special:Log for this page.
    mw.loader.using( 'mediawiki.util', function () {
        mw.util.addPortletLink(
            'p-cactions',
            mw.util.getUrl( 'Special:Log', { page : conf.wgPageName } ),
            'Logs'
        );
    } );
}

Latest revision as of 19:09, 29 March 2025