MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 59: Line 59:
   }
   }
})();
})();
document.addEventListener('DOMContentLoaded', function () {
  var notice = document.getElementById('siteNotice');
  if (!notice) return;
  var closeBtn = document.createElement('button');
  closeBtn.textContent = '×';
  closeBtn.className = 'icelist-notice-close';
  closeBtn.setAttribute('aria-label','Close');
  notice.appendChild(closeBtn);
  closeBtn.addEventListener('click', function () {
    notice.style.display = 'none';
    localStorage.setItem('icelist_anon_donate_dismiss_until', String(Date.now() + 14*24*60*60*1000));
  });
});