my website, hosted on wisp.place

fix: run giscus script once

+1
+1
src/components/Comments.astro
··· 2 <script> 3 function Comments() { 4 // the giscus stuff is a bit hacky but i have to do this so it works i have no idea why 5 const script = document.createElement("script"); 6 script.src = "https://giscus.app/client.js"; 7 script.setAttribute("data-repo", "intergrav/devins.page");
··· 2 <script> 3 function Comments() { 4 // the giscus stuff is a bit hacky but i have to do this so it works i have no idea why 5 + if (document.querySelector('iframe.giscus-frame')) return; 6 const script = document.createElement("script"); 7 script.src = "https://giscus.app/client.js"; 8 script.setAttribute("data-repo", "intergrav/devins.page");