Bureaucrats, Check users, Interface administrators, Push subscription managers, Suppressors, Administrators, upwizcampeditors
1,718
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
/* All JavaScript here will be loaded for users of the Vector skin */ | /* All JavaScript here will be loaded for users of the Vector skin */ | ||
mw.loader.getScript( '/index.php?title=MediaWiki:Dark.css&action=raw&ctype=text/css', 'text/css' ).then( // -> Load custom dark css styling first | mw.loader.getScript( '/index.php?title=MediaWiki:Dark.css&action=raw&ctype=text/css', 'text/css' ).then( // -> Load custom dark css styling first | ||
Line 7: | Line 5: | ||
console.log("Custom CSS Styling loaded!") | 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 | mw.loader.load( '/index.php?title=MediaWiki:DarkReader.js&action=raw&ctype=text/javascript' ) // -> Now load DarkReader to refine our custom dark css styling | ||
// Comment above and uncomment below to use JSDelivr for loading DarkReader, slightly (50ms diff) more loading time than using Comet | |||
/* mw.loader.getScript('https://cdn.jsdelivr.net/npm/darkreader@4/darkreader.min.js').then( | /* mw.loader.getScript('https://cdn.jsdelivr.net/npm/darkreader@4/darkreader.min.js').then( | ||
function () { | function () { | ||
Line 19: | Line 19: | ||
console.log("Darkreader Enabled Using JSDelivr!"); | console.log("Darkreader Enabled Using JSDelivr!"); | ||
}, function( e ) { | }, function( e ) { | ||
mw.log.error( e.message ); | mw.log.error( e.message ); | ||
console.error( e.message ); | console.error( e.message ); | ||
} | } | ||
Line 25: | Line 25: | ||
}, | }, | ||
function ( e ) { | function ( e ) { | ||
mw.log.error( e.message ); | mw.log.error( e.message ); | ||
} | } | ||
) | ) |
edits