2016-10-17 21:30:32 +00:00
|
|
|
( function ( mw ) {
|
2016-05-16 20:32:11 +00:00
|
|
|
var previousLogData,
|
|
|
|
// Log the popup event as defined in the schema
|
|
|
|
// https://meta.wikimedia.org/wiki/Schema:Popups
|
|
|
|
schemaPopups = new mw.eventLog.Schema(
|
|
|
|
'Popups',
|
|
|
|
mw.popups.schemaPopups.getSamplingRate(),
|
|
|
|
mw.popups.schemaPopups.getDefaultValues()
|
|
|
|
);
|
2016-05-12 22:37:19 +00:00
|
|
|
|
2016-10-20 16:38:35 +00:00
|
|
|
mw.trackSubscribe( 'ext.popups.event', function ( topic, data ) {
|
2016-10-27 10:10:39 +00:00
|
|
|
data = mw.popups.schemaPopups.processHovercardEvent( data, previousLogData );
|
2016-05-16 20:32:11 +00:00
|
|
|
|
2016-10-24 22:58:24 +00:00
|
|
|
if ( data ) {
|
2016-05-16 20:32:11 +00:00
|
|
|
schemaPopups.log( data );
|
|
|
|
}
|
|
|
|
previousLogData = data;
|
2016-05-12 22:37:19 +00:00
|
|
|
} );
|
2016-10-17 21:30:32 +00:00
|
|
|
} )( mediaWiki );
|