MediaWiki:Common.js: Difference between revisions
EnWikiAdmin (talk | contribs) No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
document.addEventListener('DOMContentLoaded', function () { | |||
document.addEventListener( | var closeButton = document.getElementById('sitenotice-close'); | ||
if (closeButton) { | |||
closeButton.addEventListener('click', function () { | |||
var banner = document.getElementById('sitenotice-banner'); | |||
if (banner) { | |||
banner.style.display = 'none'; | |||
} | } | ||
}); | |||
} | |||
}); | }); |
Revision as of 05:30, 17 November 2024
document.addEventListener('DOMContentLoaded', function () { var closeButton = document.getElementById('sitenotice-close'); if (closeButton) { closeButton.addEventListener('click', function () { var banner = document.getElementById('sitenotice-banner'); if (banner) { banner.style.display = 'none'; } }); } });