hexo-theme-keep/source/js/main.js

31 lines
644 B
JavaScript
Raw Normal View History

window.addEventListener('DOMContentLoaded', () => {
KEEP.themeInfo = {
author: 'XPoet',
name: 'Keep',
version: KEEP.theme_config.version,
repository: 'https://github.com/XPoet/hexo-theme-keep'
}
KEEP.refresh = () => {
KEEP.initUtils();
KEEP.initHeaderShrink();
KEEP.initModeToggle();
KEEP.initBack2Top();
2021-01-05 17:01:15 +08:00
if (KEEP.theme_config.local_search.enable === true) {
KEEP.initLocalSearch();
}
if (KEEP.theme_config.code_copy.enable === true) {
KEEP.initCodeCopy();
}
2021-01-07 15:15:39 +08:00
if (KEEP.theme_config.lazyload.enable === true) {
KEEP.initLazyLoad();
}
}
KEEP.refresh();
});