]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
hack for dropbox
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 24 Jul 2014 21:03:08 +0000 (02:03 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 24 Jul 2014 21:03:08 +0000 (02:03 +0500)
html5/verto/demo/verto.js

index e8cc4568672f6dfcb33191c58c58013d5098ac58..2099824f13245cbe00cf27b263a9765dae0288b7 100644 (file)
@@ -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, "<a target='_blank' href='$1'>$1<br><img border='0' class='chatimg' src='$1?dl=1'><\/a>");
+               var mod = "";
+               if (body.match(/dropbox.com/)) {
+                   mod = "?dl=1";
+               }
+               body = body.replace(/(http[s]{0,1}:\/\/\S+)/g, "<a target='_blank' href='$1'>$1<br><img border='0' class='chatimg' src='$1'" + mod + "><\/a>");
            } else {
                body = body.replace(/(http[s]{0,1}:\/\/\S+)/g, "<a target='_blank' href='$1'>$1<\/a>");
            }