MediaWiki:Common.js: Difference between revisions
(hide main page title) |
(removing fooling thing because apparently conflicts with the editor :() |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
mw.loader.using( ['mediawiki.util'] ).done( function () { | |||
var isDiff = mw.util.getParamValue('diff') || mw.util.getParamValue('oldid'); | var isDiff = mw.util.getParamValue('diff') || mw.util.getParamValue('oldid'); | ||
Line 6: | Line 6: | ||
mw.util.addCSS('h1.firstHeading, div#siteNotice { display: none !important; }'); | mw.util.addCSS('h1.firstHeading, div#siteNotice { display: none !important; }'); | ||
} | } | ||
} ); |
Latest revision as of 18:32, 1 April 2019
/* Any JavaScript here will be loaded for all users on every page load. */ mw.loader.using( ['mediawiki.util'] ).done( function () { var isDiff = mw.util.getParamValue('diff') || mw.util.getParamValue('oldid'); if (mw.config.get('wgIsMainPage') && mw.config.get('wgIsArticle') && !isDiff){ mw.util.addCSS('h1.firstHeading, div#siteNotice { display: none !important; }'); } } );