MediaWiki:Vector-2022.js: Difference between revisions

Content deleted Content added
Now do for anons as expected :-)
Tag: Reverted
Disabling instrumentation as this is no longer needed
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.anons.${name}`, 1 );
}
});
})());