MediaWiki:Common.js
From jugglingpatterns
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.
// use by using Template:AnimateSiteswap which provides the matching html import("/js/animation.js"); import("/js/darkreader/darkreader.js"); DarkReader.enable({ brightness: 100, contrast: 90, sepia: 10 }); DarkReader.disable(); // Enable when the system color scheme is dark. DarkReader.auto({ brightness: 100, contrast: 90, sepia: 10 }); // Stop watching for the system color scheme. DarkReader.auto(false); // Get the generated CSS of Dark Reader returned as a string. const CSS = await DarkReader.exportGeneratedCSS(); // Check if Dark Reader is enabled. const isEnabled = DarkReader.isEnabled();