From dccc5695e0a3baee7cf7f86efbd3693c03d16d5a Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Tue, 3 May 2016 23:02:54 -0300 Subject: [PATCH] support decodeShortURI returning an array [url,mimetype] instead of just url string --- js/interface_common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/interface_common.js b/js/interface_common.js index 3b6a15f..04dc8f7 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -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')