diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/assets/embed.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/assets/embed.js b/src/main/assets/embed.js index 079d07db..1fb7f25b 100644 --- a/src/main/assets/embed.js +++ b/src/main/assets/embed.js @@ -152,7 +152,9 @@ function getEmbeddableLinkTypes() { ctsDefault: false, re: /\.(jpe?g|png|svg)(:[a-zA-Z]+)?(?:\?[\w&;\?=]*)?$/i, makeNode: function(aNode, reResult, div) { - div.innerHTML = `<a href="${aNode.href}"><img src="${aNode.href}"></a>`; + // dirty fix for dropbox urls + let url = aNode.href.endsWith('dl=0') ? aNode.href.replace('dl=0', 'raw=1') : aNode.href; + div.innerHTML = `<a href="${url}"><img src="${url}"></a>`; return div; } }, |