change common.js

This commit is contained in:
florian 2025-06-17 14:11:10 +02:00
parent ff7f6107ce
commit 64d7f835a8

View File

@ -3,12 +3,12 @@ const footerElement = document.querySelector('footer');
async function loadHeaderFooter() { async function loadHeaderFooter() {
try { try {
const headerResponse = await fetch('/header-snippet.html'); const headerResponse = await fetch('https://commonhtml.thepenguinontheweb.tech/header-snippet.html');
if (!headerResponse.ok) throw new Error('Failed to load header'); if (!headerResponse.ok) throw new Error('Failed to load header');
const headerHTML = await headerResponse.text(); const headerHTML = await headerResponse.text();
headerElement.innerHTML = headerHTML; headerElement.innerHTML = headerHTML;
const footerResponse = await fetch('/footer-snippet.html'); const footerResponse = await fetch('https://commonhtml.thepenguinontheweb.tech/footer-snippet.html');
if (!footerResponse.ok) throw new Error('Failed to load footer'); if (!footerResponse.ok) throw new Error('Failed to load footer');
const footerHTML = await footerResponse.text(); const footerHTML = await footerResponse.text();
footerElement.innerHTML = footerHTML; footerElement.innerHTML = footerHTML;