Jump to content

📢 Please make sure to read our Style Guide before editing. For questions, suggestions, or technical issues, please contact Noah.

MediaWiki:Common.js: Difference between revisions

From CrabCraft Wiki
No edit summary
No edit summary
 
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 () {
  if (localStorage.getItem('hideSitenotice') !== 'true') {
    $('#custom-sitenotice').show();
  }
  $('#sitenotice-close').on('click', function () {
    $('#custom-sitenotice').slideUp();
    localStorage.setItem('hideSitenotice', 'true');
  });
});

Latest revision as of 22:05, 23 June 2025

/* Any JavaScript here will be loaded for all users on every page load. */

$(function () {
  if (localStorage.getItem('hideSitenotice') !== 'true') {
    $('#custom-sitenotice').show();
  }

  $('#sitenotice-close').on('click', function () {
    $('#custom-sitenotice').slideUp();
    localStorage.setItem('hideSitenotice', 'true');
  });
});