MediaWiki:Common.js: Difference between revisions

no edit summary
 
No edit summary
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'
);
} );