MediaWiki:Vector.js: Difference between revisions
imported>Smallketchup82 No edit summary |
imported>Smallketchup82 No edit summary |
||
Line 8: | Line 8: | ||
mw.loader.getScript( '/index.php?title=MediaWiki:DarkReader.js&action=raw&ctype=text/javascript' ).then( // -> Now load DarkReader to refine our custom dark css styling | mw.loader.getScript( '/index.php?title=MediaWiki:DarkReader.js&action=raw&ctype=text/javascript' ).then( // -> Now load DarkReader to refine our custom dark css styling | ||
function () { | function () { | ||
}, | }, | ||
function ( e ) { | function ( e ) { |
Revision as of 20:49, 11 January 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.getScript( '/index.php?title=MediaWiki:DarkReader.js&action=raw&ctype=text/javascript' ).then( // -> Now load DarkReader to refine our custom dark css styling function () { }, function ( e ) { mw.log.error( e.message ); // => "Failed to load script" } ); }, function ( e ) { mw.log.error( e.message ); // => "Failed to load script" } )