mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 15:44:09 +00:00
Merge "Hygiene: Remove unnecessary IIFE in changeListeners/eventLogging.js"
This commit is contained in:
commit
319c04ce2f
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map
vendored
BIN
resources/dist/index.js.map
vendored
Binary file not shown.
|
@ -1,28 +1,26 @@
|
|||
( function ( $ ) {
|
||||
var $ = jQuery;
|
||||
|
||||
/**
|
||||
* Creates an instance of the event logging change listener.
|
||||
*
|
||||
* When an event is enqueued to be logged it'll be logged using the schema.
|
||||
* Since it's the responsibility of EventLogging (and the UA) to deliver
|
||||
* logged events, the `EVENT_LOGGED` is immediately dispatched rather than
|
||||
* waiting for some indicator of completion.
|
||||
*
|
||||
* @param {Object} boundActions
|
||||
* @param {mw.eventLog.Schema} schema
|
||||
* @return {ext.popups.ChangeListener}
|
||||
*/
|
||||
module.exports = function ( boundActions, schema ) {
|
||||
return function ( _, state ) {
|
||||
var eventLogging = state.eventLogging,
|
||||
event = eventLogging.event;
|
||||
/**
|
||||
* Creates an instance of the event logging change listener.
|
||||
*
|
||||
* When an event is enqueued to be logged it'll be logged using the schema.
|
||||
* Since it's the responsibility of EventLogging (and the UA) to deliver
|
||||
* logged events, the `EVENT_LOGGED` is immediately dispatched rather than
|
||||
* waiting for some indicator of completion.
|
||||
*
|
||||
* @param {Object} boundActions
|
||||
* @param {mw.eventLog.Schema} schema
|
||||
* @return {ext.popups.ChangeListener}
|
||||
*/
|
||||
module.exports = function ( boundActions, schema ) {
|
||||
return function ( _, state ) {
|
||||
var eventLogging = state.eventLogging,
|
||||
event = eventLogging.event;
|
||||
|
||||
if ( event ) {
|
||||
schema.log( $.extend( true, {}, eventLogging.baseData, event ) );
|
||||
if ( event ) {
|
||||
schema.log( $.extend( true, {}, eventLogging.baseData, event ) );
|
||||
|
||||
boundActions.eventLogged();
|
||||
}
|
||||
};
|
||||
boundActions.eventLogged();
|
||||
}
|
||||
};
|
||||
|
||||
}( jQuery ) );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue