MediaWiki:Vector.js: Difference between revisions
imported>Smallketchup82 No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
}, | }, | ||
function ( e ) { | function ( e ) { | ||
mw.log.error( e.message ); // => "Failed to load | mw.log.error( e.message ); // => "Failed to load darkreader!" | ||
} | } | ||
) | ) |
Revision as of 23:22, 26 June 2022
/* All JavaScript here will be loaded for users of the Vector skin */ // Load Scripts mw.loader.getScript( '/index.php?title=MediaWiki:Dark.css&action=raw&ctype=text/css', 'text/css' ).then( // -> Load custom dark css styling first function () { console.log("Custom CSS Styling loaded!") mw.loader.load( '/index.php?title=MediaWiki:DarkReader.js&action=raw&ctype=text/javascript' ) // -> Now load DarkReader to refine our custom dark css styling }, function ( e ) { mw.log.error( e.message ); // => "Failed to load darkreader!" } )