mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-15 11:46:55 +00:00
19349c0108
Changes: * Make grunt:qunit run all QUnit tests in those modules whose names being with "ext.popups". * Add ext.popups/index.js, which initialises the mw.popups namespace. * Add ext.popups/userSettings.js, which contains the code that deals with interacting with the User Agent's storage. * Add ext.popups/experiment.js, which contains the code that that decides whether or not the user is in the experiment condition. * Add tests for both units, converting existing tests where appropriate. * Remove the associated code from ext.popups.core/ext.popups.core.js. * Finally, dispatch the BOOT action against the store in ext.popups/boot.js. Change-Id: I697207677304bd49c7cfe1d37bb0a4af7810f387
16 lines
287 B
JavaScript
16 lines
287 B
JavaScript
( function ( mw ) {
|
|
|
|
mw.popups.actions = {};
|
|
|
|
/**
|
|
* @param {Function} isUserInCondition See `mw.popups.createExperiment`
|
|
*/
|
|
mw.popups.actions.boot = function ( isUserInCondition ) {
|
|
return {
|
|
type: 'BOOT',
|
|
isUserInCondition: isUserInCondition()
|
|
};
|
|
};
|
|
|
|
}( mediaWiki ) );
|