diff --git a/assets/config.json.sample b/assets/config.json.sample index e93291d..cdb5a76 100644 --- a/assets/config.json.sample +++ b/assets/config.json.sample @@ -2,6 +2,7 @@ "jitsiLauncher": "server.domain.tld/subdir", "jitsiHost": "jit.si", "nextcloudBase": "https://cloud.domain.tld", + "legalNotice": "https://www.domain.tld/legal-notice", "allowAdhocMeetings": true, "launchTimeout": 2000, "backgroundImage": "path/to/backgroundimage", diff --git a/assets/launch.js b/assets/launch.js index 3c7cec4..c48c5ee 100644 --- a/assets/launch.js +++ b/assets/launch.js @@ -382,6 +382,23 @@ function applyAdhocButton() { createAdhocButton.classList.remove("hidden"); } +/* ============================================================ + * LEGAL NOTICE LINK + * ============================================================ */ + +/* + * Only show if a legal notice URL is configured + * (CONFIG.legalNotice in assets/config.json). + */ +function applyLegalNoticeLink() { + if (!CONFIG.legalNotice || !legalNoticeLink) { + return; + } + + legalNoticeLink.href = CONFIG.legalNotice; + legalNoticeLink.classList.remove("hidden"); +} + /* ============================================================ * DOM elements * ============================================================ @@ -432,6 +449,7 @@ const copyAdhocLinkButton = document.getElementById("copyAdhocLinkButton"); const navbar = document.querySelector(".navbar"); const navToggle = document.getElementById("navToggle"); const navActions = document.getElementById("navActions"); +const legalNoticeLink = document.getElementById("legalNoticeLink"); /* Language menu DOM elements */ const langMenu = document.getElementById("langMenu"); @@ -1621,6 +1639,7 @@ async function start() { applyFavicons(); applyNextcloudButton(); applyAdhocButton(); + applyLegalNoticeLink(); await loadTranslations(); diff --git a/launch.html b/launch.html index 2c0b42b..65b064c 100644 --- a/launch.html +++ b/launch.html @@ -30,7 +30,7 @@