MediaWiki:Common.js: Difference between revisions
From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
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 10:12, March 28, 2022
/* Any JavaScript here will be loaded for all users on every page load. */
/* Fix desktop anchor ad close button */
$('body.newbie').on('click', '#ssrt-close-anchor-button', function() {
$('body > .ad-sticky-wrapper').hide();
});
/* 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');
}
});