summaryrefslogtreecommitdiff
path: root/client/js/models
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-12-13 01:15:30 +0100
committerrr- <rr-@sakuya.pl>2018-12-22 12:25:12 +0100
commite6445b431f9f155b4511d8ceeffaf3a3fded425b (patch)
tree38d2777e41b5d4335cefc827fd7f0f139dc53ee3 /client/js/models
parentd3cabc4a36d1a20007b3dcf580157bec2c204808 (diff)
client/posts: fix absolute url on certain domains
Use the document base href to generate absolute url. Otherwise the image link send to IQDB/google images will be invalid
Diffstat (limited to 'client/js/models')
-rw-r--r--client/js/models/post.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/js/models/post.js b/client/js/models/post.js
index be0230c..aea8c4c 100644
--- a/client/js/models/post.js
+++ b/client/js/models/post.js
@@ -276,7 +276,7 @@ class Post extends events.EventTarget {
_user: response.user,
_safety: response.safety,
_contentUrl: response.contentUrl,
- _fullContentUrl: new URL(response.contentUrl, window.location.href).href,
+ _fullContentUrl: new URL(response.contentUrl, document.getElementsByTagName('base')[0].href).href,
_thumbnailUrl: response.thumbnailUrl,
_canvasWidth: response.canvasWidth,
_canvasHeight: response.canvasHeight,