From f8b1334a9a993198c0c13278aee57385385a4f21 Mon Sep 17 00:00:00 2001 From: Kantine Wrapper Date: Thu, 26 Feb 2026 08:25:07 +0100 Subject: [PATCH] fix: inject favicon into page when bookmarklet runs (v1.4.23) --- changelog.md | 3 +++ kantine.js | 10 ++++++++++ version.txt | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 8b496af..6eb89af 100755 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +## v1.4.23 +- 🐛 **Bugfix**: Favicon wird jetzt beim Ausführen des Bookmarklets in die Seite injiziert (ersetzt das Bessa-Favicon im Tab). Chrome cached das Icon und übernimmt es anschließend auch in die Lesezeichenleiste. + ## v1.4.22 - 📝 **Docs**: Vollständiger Dokumentations-Audit: README.md um fehlende Dateien (favicon.svg, release.sh, Tests) und Features (Bestellhistorie, Version-Menü, Cache leeren, Favicon) ergänzt. REQUIREMENTS.md: Doppelte IDs (FR-090/091) behoben, FR-092 an dynamische Glow-Logik angepasst, FR-116 (Cache leeren) und FR-117 (Favicon) hinzugefügt, NFR-008 um DOM-Tests erweitert. diff --git a/kantine.js b/kantine.js index bb3c5c4..3f27bd6 100755 --- a/kantine.js +++ b/kantine.js @@ -50,6 +50,16 @@ // Replace entire page content document.title = 'Kantine Weekly Menu'; + // Inject custom favicon (triangle + fork & knife) + if (document.querySelectorAll) { + document.querySelectorAll('link[rel*="icon"]').forEach(el => el.remove()); + } + const favicon = document.createElement('link'); + favicon.rel = 'icon'; + favicon.type = 'image/svg+xml'; + favicon.href = 'data:image/svg+xml,' + encodeURIComponent(''); + document.head.appendChild(favicon); + // Inject Google Fonts if not already present if (!document.querySelector('link[href*="fonts.googleapis.com/css2?family=Inter"]')) { const fontLink = document.createElement('link'); diff --git a/version.txt b/version.txt index 6565284..bc21db3 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v1.4.22 +v1.4.23