MediaWiki:Common.js: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
mw.loader.using( 'jquery' ).then( function () { | mw.loader.using( 'jquery' ).then( function () { | ||
$( function() { // Document ready shorthand | $( function() { // Document ready shorthand | ||
// Add the class to the HTML element | |||
document.documentElement.classList.add( 'vector-theme-dark' ); | document.documentElement.classList.add( 'vector-theme-dark' ); | ||
// Optional: Log to console to confirm execution | |||
console.log( 'Attempted to apply dark theme via Common.js' ); | |||
} ); | } ); | ||
} ); | } ); | ||
Revision as of 00:06, 16 April 2025
mw.loader.using( 'jquery' ).then( function () {
$( function() { // Document ready shorthand
// Add the class to the HTML element
document.documentElement.classList.add( 'vector-theme-dark' );
// Optional: Log to console to confirm execution
console.log( 'Attempted to apply dark theme via Common.js' );
} );
} );