From 1235a5e1482dec40fb7aaf68cfd5dda20cd3313d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Mon, 18 Aug 2014 16:37:45 +0100 Subject: [PATCH] Embed Dropbox images We need to pass a parameter, "?dl=1", to get the actual file --- js/plugins.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/plugins.js b/js/plugins.js index 0f356ce..4230365 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -259,6 +259,9 @@ plugins.factory('userPlugins', function() { } else if (url.match(/^http:\/\/(i\.)?imgur\.com\//i)) { // remove protocol specification to load over https if used by g-b url = url.replace(/http:/, ""); + } else if (url.match(/^https:\/\/www\.dropbox\.com\/s\/[a-z0-9]+\/[^?]+$/i)) { + // Dropbox requires a get parameter, dl=1 + url = url + "?dl=1"; } return '';