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

View File

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