Remove logging the language selection method
Removed the code to log whether map(removed long time back), search, common languages used for selecting the language. This logs were introduced to measure and adapt UI effectiveness. No longer needed now. Change-Id: I83bdd250cb6474da4fbf22aed2011071b9f9eba4
This commit is contained in:
@@ -313,8 +313,6 @@
|
||||
onVisible: function () {
|
||||
var $parent;
|
||||
|
||||
mw.uls.addEventLoggingTriggers();
|
||||
|
||||
if ( !displaySettings.$parent.$window.hasClass( 'callout' ) ) {
|
||||
// Callout menus will have position rules.
|
||||
// Others use the default position.
|
||||
|
||||
@@ -177,10 +177,6 @@
|
||||
interfaceLanguage: language
|
||||
};
|
||||
|
||||
if ( mw.uls.languageSelectionMethod !== undefined ) {
|
||||
logParams.languageSelectionMethod = mw.uls.languageSelectionMethod;
|
||||
}
|
||||
|
||||
this.log( logParams ).always( deferred.resolve );
|
||||
},
|
||||
|
||||
|
||||
@@ -27,39 +27,6 @@
|
||||
mw.uls.previousLanguageAutonymCookie = 'uls-previous-language-autonym';
|
||||
mw.uls.languageSettingsModules = [ 'ext.uls.inputsettings', 'ext.uls.displaysettings' ];
|
||||
|
||||
// What was the last thing that the user did to select the language:
|
||||
// * 'map' - clicked the map
|
||||
// * 'search' - typed in the search box
|
||||
// * 'common' - clicked a link in the "Common languages" section
|
||||
// If the user just clicked in some other section, it remains undefined.
|
||||
// This is useful for logging.
|
||||
mw.uls.languageSelectionMethod = undefined;
|
||||
|
||||
/**
|
||||
* Add event logging triggers, which are common to different
|
||||
* ULS instances
|
||||
*/
|
||||
mw.uls.addEventLoggingTriggers = function () {
|
||||
// Remove previous values when reinitializing
|
||||
mw.uls.languageSelectionMethod = undefined;
|
||||
|
||||
$( '#uls-map-block' ).on( 'click', function () {
|
||||
mw.uls.languageSelectionMethod = 'map';
|
||||
} );
|
||||
|
||||
$( '#uls-languagefilter' ).on( 'keydown', function () {
|
||||
// If it's the first letter,
|
||||
// log the usage of the search box
|
||||
if ( $( this ).val() === '' ) {
|
||||
mw.uls.languageSelectionMethod = 'search';
|
||||
}
|
||||
} );
|
||||
|
||||
$( '#uls-lcd-quicklist a' ).on( 'click', function () {
|
||||
mw.uls.languageSelectionMethod = 'common';
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* Change the language of wiki using API or set cookie and reload the page
|
||||
*
|
||||
|
||||
@@ -449,9 +449,6 @@
|
||||
},
|
||||
onSelect: function ( language ) {
|
||||
mw.uls.changeLanguage( language );
|
||||
},
|
||||
onVisible: function () {
|
||||
mw.uls.addEventLoggingTriggers();
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user