Invoke onUserClick to allow impls to do whatever on user clicks.
This commit is contained in:
parent
11ef1ac336
commit
24ac801417
1 changed files with 4 additions and 3 deletions
|
@ -95,13 +95,14 @@ function matrixLinkify(linkify) {
|
||||||
S_AT_NAME_COLON_DOMAIN_DOT.on(TT.TLD, S_USERID);
|
S_AT_NAME_COLON_DOMAIN_DOT.on(TT.TLD, S_USERID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
matrixLinkify.onUserClick = function(e, userId) {};
|
||||||
|
|
||||||
matrixLinkify.options = {
|
matrixLinkify.options = {
|
||||||
events: function (href, type) {
|
events: function (href, type) {
|
||||||
if (type === "userid") {
|
if (type === "userid") {
|
||||||
return {
|
return {
|
||||||
click: function(e) {
|
click: function(e) {
|
||||||
// sprout a MemberInfo context menu
|
matrixLinkify.onUserClick(e, href);
|
||||||
console.log("Context => %s", href);
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -116,6 +117,6 @@ matrixLinkify.options = {
|
||||||
return href;
|
return href;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
module.exports = matrixLinkify;
|
module.exports = matrixLinkify;
|
||||||
|
|
Loading…
Reference in a new issue