adventskalender/2025/js/background.js aktualisiert

This commit is contained in:
2025-11-08 10:08:52 +00:00
parent 38a1c0aea4
commit 20d5b4f109

View File

@@ -24,7 +24,7 @@
const basePath = "assets/images/"; const basePath = "assets/images/";
// === Favicon setzen (.webp) === // === Favicon setzen (.webp) ===
function setFavicon(path) { function setFavicon(filename) {
let link = document.querySelector('link[rel="icon"]'); let link = document.querySelector('link[rel="icon"]');
if (!link) { if (!link) {
link = document.createElement("link"); link = document.createElement("link");
@@ -32,8 +32,8 @@
link.type = "image/png"; link.type = "image/png";
document.head.appendChild(link); document.head.appendChild(link);
} }
link.href = `${basePath}${filename}.webp`; link.href = `assets/images/1920/webp/${filename}.webp`;
} }
window.addEventListener("DOMContentLoaded", () => { window.addEventListener("DOMContentLoaded", () => {
const picture = document.querySelector(".kalenderbild picture"); const picture = document.querySelector(".kalenderbild picture");