mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
Hygiene: Remove dead code
Since DWELL_EVENTS_MIN_INTERACTION_TIME is always zero the check will always be true so let's not make that check unnecessarily. We might change this in future is not a good reason for keeping this code. Change-Id: I23cb7ef9caeb3df470ccf109b815c4c566b0a735
This commit is contained in:
parent
7dfad14da1
commit
74231eba4a
|
@ -80,14 +80,6 @@
|
|||
*/
|
||||
mw.popups.render.API_DELAY = 50;
|
||||
|
||||
/**
|
||||
* Minimum time to log dwelledButAbandoned events. Initially considered as
|
||||
* 250ms to avoid accidental hovers being logged. Now logging all events to
|
||||
* verify data. See T145379
|
||||
* @property DWELL_EVENTS_MIN_INTERACTION_TIME
|
||||
*/
|
||||
mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME = 0;
|
||||
|
||||
/**
|
||||
* Cache of all the popups that were opened in this session
|
||||
* @property {Object} cache
|
||||
|
@ -378,10 +370,7 @@
|
|||
function leaveInactive() {
|
||||
var $activeLink = getActiveLink();
|
||||
|
||||
if ( logData.dwellStartTime &&
|
||||
logData.linkInteractionToken &&
|
||||
mw.now() - logData.dwellStartTime >= mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME
|
||||
) {
|
||||
if ( logData.dwellStartTime && logData.linkInteractionToken ) {
|
||||
mw.track( 'ext.popups.schemaPopups', $.extend( {}, logData, {
|
||||
action: 'dwelledButAbandoned',
|
||||
totalInteractionTime: Math.round( mw.now() - logData.dwellStartTime )
|
||||
|
|
|
@ -20,9 +20,7 @@
|
|||
|
||||
$this.off( 'mouseleave blur', onLinkAbandon );
|
||||
|
||||
if ( data.dwellStartTime && data.linkInteractionToken &&
|
||||
mw.now() - data.dwellStartTime >= mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME
|
||||
) {
|
||||
if ( data.dwellStartTime && data.linkInteractionToken ) {
|
||||
mw.track( 'ext.popups.schemaPopups', {
|
||||
pageTitleHover: $this.attr( 'title' ),
|
||||
action: 'dwelledButAbandoned',
|
||||
|
|
Loading…
Reference in a new issue