mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-26 12:37:26 +00:00
hack for dropbox
This commit is contained in:
parent
6f800ef90a
commit
e09ea08c34
@ -115,7 +115,11 @@ var callbacks = {
|
|||||||
var body = data.body;
|
var body = data.body;
|
||||||
|
|
||||||
if (body.match(/\.gif|\.jpg|\.jpeg|\.png/)) {
|
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 {
|
} else {
|
||||||
body = body.replace(/(http[s]{0,1}:\/\/\S+)/g, "<a target='_blank' href='$1'>$1<\/a>");
|
body = body.replace(/(http[s]{0,1}:\/\/\S+)/g, "<a target='_blank' href='$1'>$1<\/a>");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user