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. --- 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