Jump to content

MediaWiki:Common.js: Difference between revisions

From The Final Nights
Created page with "Any JavaScript here will be loaded for all users on every page load.: * * Force Vector-2022 dark theme site-wide: ( function () { // Add the class 'vector-theme-dark' to the root <html> element // This triggers Vector-2022's built-in dark mode CSS rules. document.documentElement.classList.add( 'vector-theme-dark' ); } () );"
 
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. *
/**
mw.loader.using( 'jquery' ).then( function () {
* Force Vector-2022 dark theme site-wide
  $( function() { // Document ready shorthand
*/
      document.documentElement.classList.add( 'vector-theme-dark' );
( function () {
  } );
    // Add the class 'vector-theme-dark' to the root <html> element
} );
    // This triggers Vector-2022's built-in dark mode CSS rules.
    document.documentElement.classList.add( 'vector-theme-dark' );
} () );

Revision as of 00:03, 16 April 2025

/* Any JavaScript here will be loaded for all users on every page load. *
mw.loader.using( 'jquery' ).then( function () {
  $( function() { // Document ready shorthand
      document.documentElement.classList.add( 'vector-theme-dark' );
  } );
} );