From e09ea08c346d49ed07c86a61f92edfd2de8605d5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 25 Jul 2014 02:03:08 +0500 Subject: [PATCH] hack for dropbox --- html5/verto/demo/verto.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/html5/verto/demo/verto.js b/html5/verto/demo/verto.js index e8cc456867..2099824f13 100644 --- a/html5/verto/demo/verto.js +++ b/html5/verto/demo/verto.js @@ -115,7 +115,11 @@ var callbacks = { var body = data.body; if (body.match(/\.gif|\.jpg|\.jpeg|\.png/)) { - body = body.replace(/(http[s]{0,1}:\/\/\S+)/g, "$1
<\/a>"); + var mod = ""; + if (body.match(/dropbox.com/)) { + mod = "?dl=1"; + } + body = body.replace(/(http[s]{0,1}:\/\/\S+)/g, "
$1
<\/a>"); } else { body = body.replace(/(http[s]{0,1}:\/\/\S+)/g, "
$1<\/a>"); }