From b8161ad05291a5b03572a8ee0ffa78226a0acbc0 Mon Sep 17 00:00:00 2001 From: jesper <118400668+k1nsej@users.noreply.github.com> Date: Mon, 27 May 2024 17:38:13 +0200 Subject: [PATCH] Put meta tags into an extra file --- 404/index.html | 41 +------------ challenges/index.html | 38 +----------- colophon/index.html | 40 +------------ contact/index.html | 38 +----------- eaendorsment/index.html | 38 +----------- imprint/index.html | 38 +----------- index.html | 40 +------------ newsletter/index.html | 38 +----------- privacypolicy/index.html | 38 +----------- scripts/meta.js | 122 +++++++++++++++++++++++++++++++++++++++ 10 files changed, 141 insertions(+), 330 deletions(-) create mode 100644 scripts/meta.js diff --git a/404/index.html b/404/index.html index 1fe0e4f..2825e74 100644 --- a/404/index.html +++ b/404/index.html @@ -32,44 +32,9 @@ - - - - - - - - - - - - - - - - - - - - - - - + + +
diff --git a/challenges/index.html b/challenges/index.html index a7ab1f3..b6f40ef 100644 --- a/challenges/index.html +++ b/challenges/index.html @@ -36,42 +36,8 @@ - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/colophon/index.html b/colophon/index.html index 0ebf5b2..516e271 100644 --- a/colophon/index.html +++ b/colophon/index.html @@ -34,44 +34,8 @@ - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/contact/index.html b/contact/index.html index 04e80ac..b04691e 100644 --- a/contact/index.html +++ b/contact/index.html @@ -36,42 +36,8 @@ - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/eaendorsment/index.html b/eaendorsment/index.html index 306f439..03671a1 100644 --- a/eaendorsment/index.html +++ b/eaendorsment/index.html @@ -32,42 +32,8 @@ - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/imprint/index.html b/imprint/index.html index e4e5b06..1132939 100644 --- a/imprint/index.html +++ b/imprint/index.html @@ -28,42 +28,8 @@ - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/index.html b/index.html index ae6bf9b..543dcc1 100644 --- a/index.html +++ b/index.html @@ -32,44 +32,8 @@ - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/newsletter/index.html b/newsletter/index.html index b8dde50..87155d8 100644 --- a/newsletter/index.html +++ b/newsletter/index.html @@ -36,42 +36,8 @@ - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/privacypolicy/index.html b/privacypolicy/index.html index 2cad5e7..c6cdbdd 100644 --- a/privacypolicy/index.html +++ b/privacypolicy/index.html @@ -30,42 +30,8 @@ - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/scripts/meta.js b/scripts/meta.js new file mode 100644 index 0000000..1962658 --- /dev/null +++ b/scripts/meta.js @@ -0,0 +1,122 @@ +function addElementToHead(tagName, attributes) { + // Erstelle das neue Element + const newElement = document.createElement(tagName); + + // Setze die Attribute für das neue Element + for (const key in attributes) { + newElement.setAttribute(key, attributes[key]); + } + + // Füge das neue Element zum hinzu + document.head.appendChild(newElement); +} + +// Funktion zum Hinzufügen eines