1
0
mirror of https://github.com/twisterarmy/twister-html.git synced 2025-03-13 05:51:03 +00:00

support decodeShortURI returning an array [url,mimetype] instead of just url string

This commit is contained in:
Miguel Freitas 2016-05-03 23:02:54 -03:00
parent 1da57627f3
commit dccc5695e0

@ -898,7 +898,8 @@ function fetchShortenedURI(req) {
);
}
function applyShortenedURI(short, long) {
function applyShortenedURI(short, uriAndMimetype) {
var long = (uriAndMimetype instanceof Array) ? uriAndMimetype[0] : uriAndMimetype;
var elems = getElem('.link-shortened[href="' + short + '"]')
.attr('href', long)
.removeClass('link-shortened')