https://bugzilla.wikimedia.org/show_bug.cgi?id=52287
Web browser: --- Bug ID: 52287 Summary: Helper for logging link clicks Product: MediaWiki extensions Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: EventLogging Assignee: o...@wikimedia.org Reporter: mflasc...@wikimedia.org CC: dtarabore...@wikimedia.org, mflasc...@wikimedia.org, o...@wikimedia.org, sp...@wikimedia.org, swall...@wikimedia.org Classification: Unclassified Mobile Platform: --- GettingStarted has a method logUnlessTimeout that cancels a log attempt after a certain amount of time. Otherwise, it's the same as logEvent. This is used by code like: logging.logUnlessTimeout( { action: 'navbar-return-click', funnel: fullTask, pageId: cfg.wgArticleId, revId : cfg.wgCurRevisionId }, 500 ).always( function () { location.href = $this.attr( 'href' ); } ); evt.preventDefault(); This is the only use of logUnlessTimeout, and other people have expressed interest in the same thing. We should implement a helper method, like: function logThenNavigate( $link, eventInstance, timeout ) with timeout being optional and defaulting to 500. It would basically work the same way but handle both the href and timeout. Unlike bug 42815, the navigation is delayed until 'always' or the timeout fires, but the network request still works the same way. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l