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. --- custom/cgitrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'custom/cgitrc') diff --git a/custom/cgitrc b/custom/cgitrc index f816f56..569feb4 100644 --- a/custom/cgitrc +++ b/custom/cgitrc @@ -85,8 +85,9 @@ root-desc=a fast webinterface for the git dscm # Value is one or more urls. Default is /cgit.css. css=/cgit.css -# JavaScript document urls included on every page. An empty value disables it. -# Value is one or more urls. Default is /cgit.js. +# JavaScript document urls included on every page, loaded with defer in the +# order given. An empty value disables it. Value is one or more urls. Default +# is /cgit.js. js=/cgit.js # Shortcut icon url for all pages. Value is a url. Default is /favicon.ico. -- cgit 2.12.1