mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 07:34:11 +00:00
4d7d55ec14
This name is more fitting to the new purpose of this method. Change-Id: I48f5e9a3ae737a104270699742a96923c92e12e8
20 lines
540 B
JavaScript
20 lines
540 B
JavaScript
( function ( mw ) {
|
|
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()
|
|
);
|
|
|
|
mw.trackSubscribe( 'ext.popups.event', function ( topic, data ) {
|
|
data = mw.popups.schemaPopups.processHovercardEvent( data, previousLogData );
|
|
|
|
if ( data ) {
|
|
schemaPopups.log( data );
|
|
}
|
|
previousLogData = data;
|
|
} );
|
|
} )( mediaWiki );
|