MediaWiki:Common.js: Difference between revisions
From Destinypedia, the Destiny wiki
No edit summary Tag: Reverted |
No edit summary |
||
Line 7: | Line 7: | ||
var subpagesLink = '/Special:PrefixIndex/User:' + title + '/'; | var subpagesLink = '/Special:PrefixIndex/User:' + title + '/'; | ||
mediaWiki.util.addPortletLink('p-tb', subpagesLink, 'User subpages', 't-subpages', 'Subpages of this page'); | mediaWiki.util.addPortletLink('p-tb', subpagesLink, 'User subpages', 't-subpages', 'Subpages of this page'); | ||
} | } | ||
}); | }); |
Revision as of 09:54, July 18, 2023
/* Any JavaScript here will be loaded for all users on desktop */
/* Add subpages toolbox link on user pages */
$(function() {
var title = mw.config.get('wgTitle');
if (mw.config.get('wgCanonicalNamespace') === 'User' && !title.includes('/') && mw.config.get('skin') !== 'timeless') {
var subpagesLink = '/Special:PrefixIndex/User:' + title + '/';
mediaWiki.util.addPortletLink('p-tb', subpagesLink, 'User subpages', 't-subpages', 'Subpages of this page');
}
});