fetch shortened URI on click

This commit is contained in:
Simon Grim 2016-05-06 16:40:12 +05:00
parent 572242e0c1
commit ec37c824f9

View File

@ -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)