Fix homepage copy: run immediately instead of waiting for DOMContentLoaded

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Advait Paliwal
2026-03-24 16:18:24 -07:00
parent 42cedd3137
commit 4c0a417232

View File

@@ -197,7 +197,7 @@ const terminalCommands = [
</Layout> </Layout>
<script is:inline> <script is:inline>
document.addEventListener("DOMContentLoaded", function () { ;(function () {
var btn = document.getElementById("install-cmd") var btn = document.getElementById("install-cmd")
if (btn) btn.addEventListener("click", function () { if (btn) btn.addEventListener("click", function () {
navigator.clipboard.writeText("curl -fsSL https://feynman.is/install | bash").then(function () { navigator.clipboard.writeText("curl -fsSL https://feynman.is/install | bash").then(function () {
@@ -211,7 +211,7 @@ const terminalCommands = [
}, 2000) }, 2000)
}) })
}) })
}) })()
fetch("https://api.github.com/repos/getcompanion-ai/feynman") fetch("https://api.github.com/repos/getcompanion-ai/feynman")
.then(function(r) { return r.json() }) .then(function(r) { return r.json() })