From ec37c824f921975c5fcdde0cca85d31c3633a7d9 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Fri, 6 May 2016 16:40:12 +0500 Subject: [PATCH] fetch shortened URI on click --- js/interface_common.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/interface_common.js b/js/interface_common.js index dd60eb6..0efb434 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -865,7 +865,12 @@ function fillElemWithTxt(elem, txt, htmlFormatMsgOpt) { elem.find('a').each(function (i, elem) { var href = elem.getAttribute('href'); if (elem.classList.contains('link-shortened')) { - $(elem).on('click mouseup', {preventDefault: true}, muteEvent); + $(elem).on('click mouseup', {href: href}, + function (event) { + muteEvent(event, true); + fetchShortenedURI(event.data.href); + } + ); fetchShortenedURI(href); } else if (href && href[0] === '#') $(elem)