mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-13 16:37:52 +00:00
fetch shortened URI on click
This commit is contained in:
parent
572242e0c1
commit
ec37c824f9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user