Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Commit 57f25f2

Browse files
committed
Load javascript below the fold
1 parent 3c8e0fd commit 57f25f2

File tree

1 file changed

+7
-7
lines changed
  • haddock-api/src/Haddock/Backends

1 file changed

+7
-7
lines changed

haddock-api/src/Haddock/Backends/Xhtml.hs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ headHtml docTitle themes mathjax_url =
121121
thetitle << docTitle,
122122
styleSheet themes,
123123
script ! [src jsFile, thetype "text/javascript"] << noHtml,
124-
script ! [src jsPreactFile, thetype "text/javascript"] << noHtml,
125-
script ! [src jsFuseFile, thetype "text/javascript"] << noHtml,
126-
script ! [src jsIndexFile, thetype "text/javascript"] << noHtml,
127124
script ! [src mjUrl, thetype "text/javascript"] << noHtml,
128125
script ! [thetype "text/javascript"]
129126
-- NB: Within XHTML, the content of script tags needs to be
@@ -193,9 +190,12 @@ bodyHtml doctitle iface
193190
"Produced by " +++
194191
(anchor ! [href projectUrl] << toHtml projectName) +++
195192
(" version " ++ projectVersion)
196-
)
197-
]
193+
),
198194

195+
script ! [src jsPreactFile, thetype "text/javascript"] << noHtml,
196+
script ! [src jsFuseFile, thetype "text/javascript"] << noHtml,
197+
script ! [src jsIndexFile, thetype "text/javascript"] << noHtml
198+
]
199199

200200
moduleInfo :: Interface -> Html
201201
moduleInfo iface =
@@ -385,9 +385,9 @@ ppJsonIndex odir maybe_source_url maybe_wiki_url unicode qual_opt ifaces = do
385385
, "link" .= String (fromMaybe "" (listToMaybe (map (nameLink mdl) names)))
386386
]
387387
]
388-
where
388+
where
389389
names = exportName item
390-
390+
391391
exportName :: ExportItem DocName -> [DocName]
392392
exportName ExportDecl { expItemDecl } = getMainDeclBinder $ unLoc expItemDecl
393393
exportName ExportNoDecl { expItemName } = [expItemName]

0 commit comments

Comments
 (0)