diff --git a/js/customElements/newComment.js b/js/customElements/newComment.js
new file mode 100644
index 0000000000000000000000000000000000000000..6c113fed0e7a2bec5201dd7ec5883e41abdf967b
--- /dev/null
+++ b/js/customElements/newComment.js
@@ -0,0 +1,31 @@
+class newComment extends HTMLElement {
+    constructor() {
+        super();
+        this.setupForm();
+    }
+
+    async setupForm(){
+        let sitekey = await (await fetch("/API/config.php?name=sitekey")).text();
+
+        this.innerHTML = ` 
+            <form action="/newComment.php" method="post">
+                <label for="name">Name:</label><br>
+                <input type="text" id="name" name="name"><br><br>
+        
+                <label for="email">E-Mail: (wird nicht ver&ouml;ffentlicht)</label><br>
+                <input type="text" id="email" name="email"><br><br>
+        
+                <label for="comment">Kommentar:</label><br>
+                <textarea name="comment" id="comment"></textarea><br><br>
+                
+                <div class="h-captcha" data-theme="dark" data-sitekey="${sitekey}"></div><br>
+                
+                <input type="submit" value="Kommentar ver&ouml;ffentlichen"><br>
+                <p>Mit dem Klick auf den obigen Button erkl&auml;ren sie sich mit der <a href="/datenschutzerklaerung.html">Datenschutzerkl&auml;rung</a> einverstanden.</p>
+            </form>
+        `;
+
+    }
+}
+
+customElements.define("jl-new_comment", newComment);
\ No newline at end of file
diff --git a/js/script.js b/js/script.js
index 3989a8cc5769a56cee9267fedfb8056ed0809bd7..1057467bdd74eb1057bd3e813192bd162ebfc2cc 100644
--- a/js/script.js
+++ b/js/script.js
@@ -9,4 +9,5 @@ require("./customElements/cookie");
 require("./customElements/svgLoader");
 require("./customElements/blogFooter");
 require("./customElements/blogIndex");
-require("./customElements/commentsDisplay");
\ No newline at end of file
+require("./customElements/commentsDisplay");
+require("./customElements/newComment");
\ No newline at end of file
diff --git a/public/API/lib/mysql.php b/public/API/lib/mysql.php
index 5c1d19b9565e338f9ad1b2864577e9b57abea78c..7c09f2ea96c40e520b5588597bf8d3371ecee394 100644
--- a/public/API/lib/mysql.php
+++ b/public/API/lib/mysql.php
@@ -1,5 +1,4 @@
 <?php
-include "config.php";
 
 $conn = new mysqli($mysqlServer, $mysqlUser, $mysqlPassword, $mysqlDatabase);
 // Check connection
diff --git a/public/internal/comments.php b/public/internal/comments.php
index c62d38256f6b3a712b196b36b6b43ae5046e250b..f0bcea79de3d8f168da4394eb0327999c144237b 100644
--- a/public/internal/comments.php
+++ b/public/internal/comments.php
@@ -2,27 +2,9 @@
 
 function getComments($article){
     echo(<<<EOF
+    <script src='https://www.hCaptcha.com/1/api.js' async defer></script>
     <h2>Kommentare:</h2>
     <jl-comments_display></jl-comments_display>
-<script src='https://www.hCaptcha.com/1/api.js' async defer></script>
-<div id="newComment">
-    <form action="/newComment.php" method="post">
-        <label for="name">Name:</label><br>
-        <input type="text" id="name" name="name"><br><br>
-
-        <label for="email">E-Mail: (wird nicht ver&ouml;ffentlicht)</label><br>
-        <input type="text" id="email" name="email"><br><br>
-
-        <label for="comment">Kommentar:</label><br>
-        <textarea name="comment" id="comment"></textarea><br><br>
-        
-        <div class="h-captcha" data-theme="dark" data-sitekey="$sitekey"></div><br>
-        
-        <input type="submit" value="Kommentar ver&ouml;ffentlichen"><br>
-        <p>Mit dem klick auf den obigen Button erkl&auml;ren sie sich mit der <a href="/datenschutzerklaerung.html">Datenschutzerkl&auml;rung</a> einverstanden.</p>
-    </form>
-</div>
-
-
+    <jl-new_comment id="newComment"></jl-new_comment>
 EOF);
 }
\ No newline at end of file