From be848c1bec570bff8f80eb456adc958a9f096b19 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 9 Nov 2017 17:27:50 +0100 Subject: [PATCH] Fix broken readonly link in drive --- www/drive/inner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/drive/inner.js b/www/drive/inner.js index 864b2038d..6ecf493e5 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -2446,7 +2446,7 @@ define([ var parsed = Cryptpad.parsePadUrl(data.href); if (parsed.hashData.type !== "pad") { return; } var i = data.href.indexOf('#') + 1; - var base = APP.origin + data.href.slice(0, i); + var base = data.href.slice(0, i); var hrefsecret = Cryptpad.getSecrets(parsed.type, parsed.hash); if (!hrefsecret.keys) { return; } var viewHash = Cryptpad.getViewHashFromKeys(hrefsecret.channel, hrefsecret.keys); @@ -2484,7 +2484,7 @@ define([ var parsed = Cryptpad.parsePadUrl(data.href); if (parsed.hashData && parsed.hashData.type === 'pad') { - var roLink = ro ? base + data.href : getReadOnlyUrl(el); + var roLink = ro ? base + data.href : base + getReadOnlyUrl(el); if (roLink) { $('