MediaWiki:Common.js: Difference between revisions

The most up-to-date image and information guide on Webkinz Classic items, events, and more!
Content added Content deleted
No edit summary
(report and logs should be under the default dropdown now, hopefully)
Line 2: Line 2:
'wgCanonicalNamespace',
'wgCanonicalNamespace',
'wgTitle',
'wgTitle',
'wgPageName'
'wgPageName',
'wgCurRevisionId'
]);
]);
// Add a link to the actions menu to Special:Log for this page.
// Add a link to the actions menu to Special:Log and Special:Report for this page.
mw.loader.using( 'mediawiki.util', function () {
mw.loader.using( 'mediawiki.util', function () {
mw.util.addPortletLink(
mw.util.addPortletLink(
Line 11: Line 12:
'Logs'
'Logs'
);
);
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl( 'Special:Report', { page : conf.wgCurRevisionId } ),
'Report a problem'
);

} );
} );

Revision as of 20:56, 10 March 2023

var conf = mw.config.get([
    'wgCanonicalNamespace',
    'wgTitle',
    'wgPageName',
    'wgCurRevisionId'
]);
    // Add a link to the actions menu to Special:Log and Special:Report for this page.
    mw.loader.using( 'mediawiki.util', function () {
        mw.util.addPortletLink(
            'p-cactions',
            mw.util.getUrl( 'Special:Log', { page : conf.wgPageName } ),
            'Logs'
        );
        mw.util.addPortletLink(
            'p-cactions',
            mw.util.getUrl( 'Special:Report', { page : conf.wgCurRevisionId } ),
            'Report a problem'
        );

 }    );