MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
} | } | ||
}); | }); | ||
Revision as of 02:50, April 11, 2021
/* Any JavaScript here will be loaded for all users on every page load. */
/* Remove mobile title tags on desktop main page */
$(function() {
if (mw.config.get('wgTitle') === 'Main Page') {
$('div[id^="mf-"]').each(function(i, obj) {
$(this).removeAttr('title');
});
}
});
/* 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');
}
});