From 92751d590acb7bc56c8fab9ff35e22bb686652fd Mon Sep 17 00:00:00 2001 From: Vincenzo Cestone Date: Tue, 22 Mar 2022 12:55:35 +0100 Subject: [PATCH] Added resolve of thumbnail url --- social/d4s-social.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/social/d4s-social.js b/social/d4s-social.js index 9a03dd3..b28f093 100644 --- a/social/d4s-social.js +++ b/social/d4s-social.js @@ -39,7 +39,7 @@ window.customElements.define('d4s-social-search', class extends HTMLElement { window.customElements.define('d4s-social-posts', class extends HTMLElement { - #basepath = 'https://api.dev.d4science.org/rest' + #basepath = 'https://api.d4science.org/rest' #quantity = 20 constructor() { @@ -63,10 +63,11 @@ window.customElements.define('d4s-social-posts', class extends HTMLElement { li.setAttribute('class', 'd4s-social-post') const datetime = new Date(0) datetime.setUTCMilliseconds(post.time) + const thumbnail = (!post.thumbnail_url.startsWith('http')) ? 'https://' + d4s.clientId + post.thumbnail_url : post.thumbnail_url li.innerHTML = `
- +