fix: fixed js files load error

This commit is contained in:
XPoet 2021-01-05 17:01:15 +08:00
parent 3b86b69f55
commit bb7e05d174
3 changed files with 10 additions and 3 deletions

View File

@ -10,11 +10,11 @@
history: true,
debug: false,
cacheBust: false,
timeout: 0,
// analytics: false,
// currentUrlFullReload: false,
// scrollRestoration: false,
// scrollTo: true,
// timeout: 0,
});
window.addEventListener('pjax:complete', () => {

View File

@ -40,6 +40,7 @@ hexo.extend.helper.register('export_config', function () {
toc: theme.toc,
style: theme.style,
local_search: theme.local_search,
code_copy: theme.code_copy,
side_tools: theme.side_tools,
pjax: theme.pjax,
version: theme.version,

View File

@ -11,10 +11,16 @@ window.addEventListener('DOMContentLoaded', () => {
KEEP.initUtils();
KEEP.initHeaderShrink();
KEEP.initModeToggle();
KEEP.initLocalSearch();
KEEP.initBack2Top();
if (KEEP.theme_config.local_search.enable === true) {
KEEP.initLocalSearch();
}
if (KEEP.theme_config.code_copy.enable === true) {
KEEP.initCodeCopy();
}
}
KEEP.refresh();
});