diff --git a/app/components/feature-links.js b/app/components/feature-links.js index 385aa86..0b85661 100644 --- a/app/components/feature-links.js +++ b/app/components/feature-links.js @@ -4,7 +4,7 @@ // V A R I A B L E -const links = [ // TODO: Update images +const links = [ { href: "https://chat.lbry.io", image: "https://spee.ch/b432346bfd641990f3dc3dbceda057b4ededa360/discord-bg.jpg", diff --git a/app/sockets.js b/app/sockets.js index 7cb3c8f..532f3f3 100644 --- a/app/sockets.js +++ b/app/sockets.js @@ -102,7 +102,7 @@ function generateContent(exampleNumber, displayTrendingContent) { try { renderedContentCollection.push(`
- ${part.name} + ${part.name}
${part.value.stream.metadata.title} @@ -156,7 +156,7 @@ function generateContent(exampleNumber, displayTrendingContent) { ) { renderedContentCollection.push(`
- ${part.name} + ${part.name}
${part.value.stream.metadata.title} ${part.channel_name} @@ -311,6 +311,15 @@ function getTrendingContent() { }); } +function makeImageSourceSecure(url) { + const originalUrl = new URL(url); + + if (originalUrl.protocol !== "https") + return `https://${originalUrl.host}${originalUrl.pathname}`; + + return originalUrl.href; +} + function newsletterSubscribe(data, socket) { const email = data.email;