MediaWiki:Vector-2022.js: Difference between revisions

Content deleted Content added
Undid revision 1226356609 by Jon (WMF) (talk)
Tags: Blanking Undo
Getting some data for roll out of dark mode to anons.
Tag: Reverted
Line 1:
/* Added by [[User:Jon (WMF)]]. Work out which pages are not ready for dark mode. */
((function () {
if ( Math.random() > 0.1 ) {
return;
}
const name = document.documentElement.classList.contains('vector-feature-night-mode-disabled') ? 'cached' : 'fresh';
mw.loader.using('mediawiki.user').then(() => {
if ( !mw.user.isAnon() ) {
mw.track( `counter.MediaWiki.vector.enwikipedia.darkmode.${name}`, 1 );
}
});
})());