opt: make custom javascript delay execution

This commit is contained in:
xiaoyifang 2024-11-06 09:09:18 +08:00
parent 6efdb09b1a
commit 1418f9ab9e

View file

@ -209,7 +209,7 @@ body { background: #242525; }
// load the `article-style.js` in user's config folder
if ( auto userJsFile = Config::getUserJsFileName(); userJsFile.has_value() ) {
result += fmt::format( FMT_COMPILE( R"(<script src="file://{}"></script>)" ), userJsFile.value() );
result += fmt::format( FMT_COMPILE( R"(<script src="file://{}" defer></script>)" ), userJsFile.value() );
}
result += "</head><body>";