From 75de1148583ffc18bd79a49787e508a8db5dd55c Mon Sep 17 00:00:00 2001 From: Kalitsune Date: Sun, 12 May 2024 12:54:47 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=97=20Made=20the=20news=20button=20dis?= =?UTF-8?q?appear=20if=20no=20rss=20feed=20is=20provided?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the rss feed is empty or missing, the news button will simply not appear for those who don't want to use this feature --- app/assets/js/scripts/landing.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index 1a1c1768..06438100 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -961,6 +961,10 @@ async function loadNews(){ const distroData = await DistroAPI.getDistribution() if(!distroData.rawDistribution.rss) { loggerLanding.debug('No RSS feed provided.') + + // remove the news button + await $('#newsButton').fadeOut(250).promise() + return null }