MediaWiki:Vector-2022.js: Difference between revisions

Content deleted Content added
Count errors to support phab:T371325
Tag: Reverted
Undid revision 1252795240 by Jon (WMF) (talk)
Tags: Blanking Undo
 
(5 intermediate revisions by the same user not shown)
Line 1:
/* Added by [[User:Jon (WMF)]] to support analysis of T371325.
Count how report error is used. */
((function () {
if ( Math.random() > 0.1 ) {
return;
}
mw.loader.using( 'skins.vector.clientPreferences').then(()=> {
$('#skin-theme-beta-notice a').on('click', () => {
mw.track( `counter.MediaWiki.vector.darkmode-error.en.wikipedia.${mw.config.get( 'wgPageName' )}`, 1 );
} );
} );
})());