Difference between revisions of "MediaWiki:Common.js"
| 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. */ | ||
| − | function | + | (function () { |
var el = document.getElementById('mw-content-text'); | var el = document.getElementById('mw-content-text'); | ||
| Line 15: | Line 15: | ||
} | } | ||
| − | } | + | })(); |
| − | |||
| − | |||
Revision as of 16:45, 23 October 2017
/* Any JavaScript here will be loaded for all users on every page load. */
(function () {
var el = document.getElementById('mw-content-text');
if(!mw.config.values.wgUserId){
el.children[0].style.display = 'none';
} else {
el.children[0].style.display = 'block';
}
})();