mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
Merge pull request #1905 from xiaoyifang/opt/custom-js-defer
opt: make custom javascript delay execution
This commit is contained in:
commit
9315dda365
|
@ -209,7 +209,7 @@ body { background: #242525; }
|
||||||
|
|
||||||
// load the `article-style.js` in user's config folder
|
// load the `article-style.js` in user's config folder
|
||||||
if ( auto userJsFile = Config::getUserJsFileName(); userJsFile.has_value() ) {
|
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>";
|
result += "</head><body>";
|
||||||
|
|
Loading…
Reference in a new issue