From 24ac8014173c3b114248dd9edb14aa1c9089b952 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Mon, 26 Oct 2015 17:59:49 +0000 Subject: [PATCH] Invoke onUserClick to allow impls to do whatever on user clicks. --- src/linkify-matrix.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/linkify-matrix.js b/src/linkify-matrix.js index c74fb784b4..370bec7571 100644 --- a/src/linkify-matrix.js +++ b/src/linkify-matrix.js @@ -95,13 +95,14 @@ function matrixLinkify(linkify) { S_AT_NAME_COLON_DOMAIN_DOT.on(TT.TLD, S_USERID); } +matrixLinkify.onUserClick = function(e, userId) {}; + matrixLinkify.options = { events: function (href, type) { if (type === "userid") { return { click: function(e) { - // sprout a MemberInfo context menu - console.log("Context => %s", href); + matrixLinkify.onUserClick(e, href); e.preventDefault(); } }; @@ -116,6 +117,6 @@ matrixLinkify.options = { return href; } } -} +}; module.exports = matrixLinkify;