diff --git a/assets/zip/personnal-data-export-navigator/assets/js/main.js b/assets/zip/personnal-data-export-navigator/assets/js/main.js index ad82a206..55b987d9 100644 --- a/assets/zip/personnal-data-export-navigator/assets/js/main.js +++ b/assets/zip/personnal-data-export-navigator/assets/js/main.js @@ -242,6 +242,20 @@ function ApplyPosts(){ } + //Post with movie + if(post.kind == "movie"){ + + //Display the movie only (movies have a dedicated tab) + createElem2({ + appendTo: cardContent, + type: "a", + href: getFilePathFromURL(post.video_info.url), + innerHTML: "Open movie" + }); + } + + + //Display the list of comments let postComments = createElem2({ appendTo: cardContent, diff --git a/assets/zip/personnal-data-export-navigator/assets/js/utils.js b/assets/zip/personnal-data-export-navigator/assets/js/utils.js index 284bcc81..2910c682 100644 --- a/assets/zip/personnal-data-export-navigator/assets/js/utils.js +++ b/assets/zip/personnal-data-export-navigator/assets/js/utils.js @@ -143,12 +143,12 @@ function error(message){ } /** - * Get the path to an image + * Get the path to a file originally hosted on user data server * - * @param {String} url The original URL of the image - * @return {String} Locally accessible path to the image + * @param {String} url The original URL of the file + * @return {String} Locally accessible path to the file */ -function getImagePath(url){ +function getFilePathFromURL(url){ return STORAGE_URL + url.replace("://", "/"); } @@ -173,7 +173,7 @@ function timeToStr(time){ * @param {String} url The original URL of the image */ function applyURLToImage(el, url){ - el.src = getImagePath(url); + el.src = getFilePathFromURL(url); el.className += " responsive-img"; }