From c28afe791bd1be6ba2999d688f4ea2b00925ad37 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 10 Mar 2020 20:03:10 +0300 Subject: Dirty fix for dropbox urls --- src/main/assets/embed.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main') 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 = ``; + // dirty fix for dropbox urls + let url = aNode.href.endsWith('dl=0') ? aNode.href.replace('dl=0', 'raw=1') : aNode.href; + div.innerHTML = ``; return div; } }, -- cgit v1.2.3