adventskalender/2025/js/background.js aktualisiert
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user