MediaWiki:Vector.js: Difference between revisions

Undo revision 8740 by Smallketchup82 (talk)
imported>Smallketchup82
No edit summary
imported>Smallketchup82
(Undo revision 8740 by Smallketchup82 (talk))
Line 3: Line 3:
// Load Scripts
// Load Scripts


mw.loader.getScript( '/index.php?title=MediaWiki:DarkReader.js&action=raw&ctype=text/javascript', 'text/javascript' ).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
function () {
function () {
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 () {
DarkReader.setFetchMethod(window.fetch);
DarkReader.setFetchMethod(window.fetch);
DarkReader.enable();
DarkReader.enable();
console.log("Darkreader Enabled!");
console.log("Darkreader Enabled!");
mw.loader.getScript( '/index.php?title=MediaWiki:Dark.css&action=raw&ctype=text/css', 'text/css' ).then( // -> Now load DarkReader to refine our custom dark css styling
function () {
console.log("Custom styling enabled!")
},
},
function ( e ) {
function ( e ) {