MediaWiki:Centralnotice-template-darkmode modal desktop

<script>

   const isPageInLightMode = document.documentElement.classList.contains( 'skin-theme-clientpref-day' );
   const isDarkModeAvailable = !document.documentElement.classList.contains( 'vector-feature-night-mode-disabled' );
   const isAllowedWiki = location.host.match( /(en|zh|fr|pl).wikipedia.org/ );
   const shouldShowBanner = isPageInLightMode && isDarkModeAvailable && isAllowedWiki;
   /**
    * Show the banner
    * 1. If the query param "banner" is used
    * 2. On the first page-view in light mode.
    **/
   if ( ( window.location.search.match( 'banner' ) !== null ) || shouldShowBanner ) {
       mw.loader.using( 'skins.vector.DarkModeLaunchBanner', function( require ) {
           require( 'skins.vector.DarkModeLaunchBanner')();
       } );
   }

</script>