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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l