diff --git a/README.md b/README.md index b6a1955..9a4d434 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Rename `assets/config.json.sample` to `assets/config.json`. | `launchTimeout` | Timeout in ms before the browser fallback is shown after trying to start the jitsi-meet-electron client. | | `backgroundImage` | Path to the page background image. Empty: no background. | | `logo` | Path to the logo shown in the logo bar. Empty: logo bar stays hidden. | +| `favicons` | Paths to the page icons: `ico` (fallback icon), `svg` (icon), `appleTouch` (Apple touch icon). The values from `launch.html` are kept if a key is missing. | | `downloads` | Download URLs for the jitsi-meet clients, shown in the fallback view per detected OS: `windows`, `macos`, `linux`, `ios`, `android`. | ## Third-party assets diff --git a/assets/config.json.sample b/assets/config.json.sample index d3539e7..e93291d 100644 --- a/assets/config.json.sample +++ b/assets/config.json.sample @@ -6,6 +6,11 @@ "launchTimeout": 2000, "backgroundImage": "path/to/backgroundimage", "logo": "path/to/logo", + "favicons": { + "ico": "path/to/favicon.ico", + "svg": "path/to/favicon.svg", + "appleTouch": "path/to/apple-touch-icon.png" + }, "downloads": { "windows": "https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.exe", "macos": "https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.dmg", diff --git a/assets/launch.js b/assets/launch.js index 82dc1f6..f27a78f 100644 --- a/assets/launch.js +++ b/assets/launch.js @@ -309,6 +309,33 @@ function applyLogo() { logoBar.classList.remove("hidden"); } +/* ============================================================ + * FAVICONS + * ============================================================ + */ + +/* + * Overwrite the default icons from launch.html + * (CONFIG.favicons in assets/config.json). + */ +function applyFavicons() { + if (!CONFIG.favicons) { + return; + } + + if (CONFIG.favicons.ico) { + faviconIco.href = CONFIG.favicons.ico; + } + + if (CONFIG.favicons.svg) { + faviconSvg.href = CONFIG.favicons.svg; + } + + if (CONFIG.favicons.appleTouch) { + appleTouchIcon.href = CONFIG.favicons.appleTouch; + } +} + /* ============================================================ * NEXTCLOUD BUTTON * ============================================================ @@ -412,6 +439,11 @@ const invalidRoomName = document.getElementById("invalidRoomName"); const logoBar = document.getElementById("logoBar"); const logoImage = document.getElementById("logoImage"); +/* Favicon DOM elements */ +const faviconIco = document.getElementById("faviconIco"); +const faviconSvg = document.getElementById("faviconSvg"); +const appleTouchIcon = document.getElementById("appleTouchIcon"); + /* Theme DOM elements */ const themeButton = document.getElementById("themeButton"); const themeIconSun = document.getElementById("themeIconSun"); @@ -1574,6 +1606,7 @@ async function start() { applyBackgroundImage(); applyLogo(); + applyFavicons(); applyNextcloudButton(); applyAdhocButton(); diff --git a/launch.html b/launch.html index ed207c5..2c0b42b 100644 --- a/launch.html +++ b/launch.html @@ -4,9 +4,9 @@ Jitsi Meeting - - - + + +