Temperatur & Wärme

Wird geladen...
 
 
 
 
 
document.addEventListener("DOMContentLoaded", function() { const target = document.querySelector(".topitems-loading"); if (!target) return; const baseUrl = location.origin + location.pathname; const url = baseUrl + "?topitems"; fetch(url, { credentials: "same-origin", headers: { "X-Requested-With": "XMLHttpRequest" } }) .then(r => r.text()) .then(html => { const doc = new DOMParser().parseFromString(html, "text/html"); const src = doc.querySelector(".topitems"); if (!src) { target.textContent = "Keine Top-Items gefunden."; return; } for (const attr of [...target.attributes]) target.removeAttribute(attr.name); target.className = "widget widget-item-list widget-primary topitems"; target.innerHTML = src.innerHTML; if (window.Vue && !target.__vue__) { try { new Vue({ el: target }); } catch (e) { console.warn("Vue mount failed:", e); } } }) .catch(err => { console.error("Top-Items Laden fehlgeschlagen:", err); target.textContent = "Fehler beim Laden."; }); });