MediaWiki:Common.js: Difference between revisions

From Ikwipedia
No edit summary
No edit summary
Line 1: Line 1:
document.addEventListener('DOMContentLoaded', function () {
document.addEventListener('DOMContentLoaded', function () {
     var closeButton = document.getElementById('sitenotice-close');
     const closeButton = document.getElementById('sitenotice-close');
     if (closeButton) {
     if (closeButton) {
         closeButton.addEventListener('click', function () {
         closeButton.addEventListener('click', function () {
             var banner = document.getElementById('sitenotice-banner');
             const banner = document.getElementById('sitenotice-banner');
             if (banner) {
             if (banner) {
                 banner.style.display = 'none';
                 banner.style.display = 'none'; // Hides the banner
             }
             }
         });
         });
     }
     }
});
});

Revision as of 05:36, 17 November 2024

document.addEventListener('DOMContentLoaded', function () {
    const closeButton = document.getElementById('sitenotice-close');
    if (closeButton) {
        closeButton.addEventListener('click', function () {
            const banner = document.getElementById('sitenotice-banner');
            if (banner) {
                banner.style.display = 'none'; // Hides the banner
            }
        });
    }
});