MediaWiki:Vector.js

From Galaxypedia
Revision as of 18:00, 13 December 2021 by imported>Smallketchup82

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* All JavaScript here will be loaded for users of the Vector skin */

// Load embedded dark reader
mw.loader.load( '/index.php?title=MediaWiki:Dark.css&action=raw&ctype=text/css', 'text/css' );
mw.loader.getScript( '/index.php?title=MediaWiki:DarkReader.js&action=raw&ctype=text/javascript' ).then(
	function () {
		DarkReader.setFetchMethod(window.fetch);
		DarkReader.enable();
    },
    function ( e ) {
        mw.log.error( e.message ); // => "Failed to load script"
    }
)