From c5ad21873acdbf3cba69d43ef9b7a5376ff3f048 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 29 Oct 2026 13:31:06 -1000 Subject: Load the scripts with defer A plain script in the head held up parsing until it had downloaded and run, though cgit.js only acts once the document is ready. Deferred scripts still run in the order given and before DOMContentLoaded, so a site script after cgit.js can still call window.cgit. --- source/ui-shared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/ui-shared.c b/source/ui-shared.c index ff691f8..e7b7d88 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -379,7 +379,7 @@ static void emit_js_link(const char *src) html("\n"); + html("' defer>\n"); } static void add_clone_urls(void (*fn)(const char *), char *urls, char *suffix) -- cgit