From f7f2fe1e876dbe14e17e796cdb89a2abea569963 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Mon, 26 Oct 2026 21:26:33 -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/ui-shared.c') 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 2.12.1