MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
Force light mode |
Force light mode |
||
| Line 1: | Line 1: | ||
/* Force | /* Force light color scheme to prevent dark mode extensions from inverting colors */ | ||
(function() { | (function () { | ||
var | var m = document.createElement('meta'); | ||
m.name = 'color-scheme'; | |||
m.content = 'light only'; | |||
document.head.insertBefore( | document.head.insertBefore(m, document.head.firstChild); | ||
}) | document.documentElement.style.colorScheme = 'light'; | ||
}()); | |||
Revision as of 00:47, 11 July 2026
/* Force light color scheme to prevent dark mode extensions from inverting colors */
(function () {
var m = document.createElement('meta');
m.name = 'color-scheme';
m.content = 'light only';
document.head.insertBefore(m, document.head.firstChild);
document.documentElement.style.colorScheme = 'light';
}());