fix: show fallback message when CDN scripts fail to load

This commit is contained in:
saberzero1 2026-05-24 16:21:07 +02:00
parent ad18a7595e
commit 2d16183f5b
No known key found for this signature in database
5 changed files with 13 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -37,6 +37,15 @@ import {
})
.catch(function (err) {
console.error("[Graph] Failed to load libraries:", err);
var containers = document.querySelectorAll(".graph-container");
for (var i = 0; i < containers.length; i++) {
containers[i].textContent = "Graph could not load. Check your network connection.";
containers[i].style.display = "flex";
containers[i].style.alignItems = "center";
containers[i].style.justifyContent = "center";
containers[i].style.color = "var(--gray)";
containers[i].style.fontSize = "0.9rem";
}
});
function initGraph() {