MediaWiki:CentralNotice/Resources/BannerReset.js

From Meta, a Wikimedia project coordination wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
<script type="text/javascript">
// CentralNotice/Resources/BannerReset.js
// Resets banner display cookies to initial/null states on reset=1 in the URL
// Parameters:
//   hide-cookie-name - Name of the hide count cookie
(function( $, mw ){
	if ( window.location.search.match( /\breset=1/ ) ) {
		$.cookie( '{{{hide-cookie-name}}}', 0, { expires: 365, path: '/' } );
		$.cookie( 'centralnotice_fundraising', 0, { expires: 365, path: '/' } );
	}
})( jQuery, mediaWiki );
</script>