MediaWiki:Common.js: Difference between revisions
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'; | ||
}()); | |||