MediaWiki:Common.js: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1: | Line 1: | ||
var conf = mw.config.get([ |
|||
/* Any JavaScript here will be loaded for all users on every page load. */ |
|||
'wgCanonicalNamespace', |
|||
//Topic:Ptixd7447tagjfa5 |
|||
'wgTitle', |
|||
function createTab() { |
|||
'wgPageName' |
|||
addPortletLink( 'p-cactions', wgArticlePath.replace( '$1', 'Special:Report' ), 'Report a problem'); |
|||
]); |
|||
} |
|||
// Add a link to the actions menu to Special:Log for this page. |
|||
addOnloadHook( createTab ); |
|||
mw.loader.using( 'mediawiki.util', function () { |
|||
mw.util.addPortletLink( |
|||
'p-cactions', |
|||
mw.util.getUrl( 'Special:Log', { page : conf.wgPageName } ), |
|||
'Logs' |
|||
); |
|||
} ); |
Revision as of 20:51, 10 March 2023
var conf = mw.config.get([
'wgCanonicalNamespace',
'wgTitle',
'wgPageName'
]);
// 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'
);
} );