diff options
author | Dillon <dillonzq@outlook.com> | 2020-05-29 06:31:26 +0300 |
---|---|---|
committer | Dillon <dillonzq@outlook.com> | 2020-05-29 06:31:26 +0300 |
commit | 4e3e54bb2ad50f7aed6b8e398a7ee8381fe39d82 (patch) | |
tree | 2de4bf53208ffc4b1ebac0da87cb0a2bd854eb29 /src | |
parent | cded7145acf8de90ea8a53c9e8bb1d09ffb44fb3 (diff) |
chore: update theme.js init
Diffstat (limited to 'src')
-rw-r--r-- | src/js/theme.js | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/src/js/theme.js b/src/js/theme.js index 91b4b9f..ac2c4e5 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -697,29 +697,36 @@ class Theme { } init() { - this.initSVGIcon(); - this.initTwemoji(); - this.initMenuMobile(); - this.initSwitchTheme(); - this.initSearch(); - this.initDetails(); - this.initLightGallery(); - this.initHighlight(); - this.initTable(); - this.initHeaderLink(); - this.initToc(); - this.initComment(); - this.initSmoothScroll(); - this.initMath(); - this.initMermaid(); - this.initEcharts(); - this.initTypeit(); - this.initMapbox(); - this.initCookieconsent(); - - this.onScroll(); - this.onResize(); - this.onClickMask(); + try { + this.initSVGIcon(); + this.initTwemoji(); + this.initMenuMobile(); + this.initSwitchTheme(); + this.initSearch(); + this.initDetails(); + this.initLightGallery(); + this.initHighlight(); + this.initTable(); + this.initHeaderLink(); + this.initSmoothScroll(); + this.initMath(); + this.initMermaid(); + this.initEcharts(); + this.initTypeit(); + this.initMapbox(); + this.initCookieconsent(); + } catch (err) { + console.error(err); + } + + window.setTimeout(() => { + this.initToc(); + this.initComment(); + + this.onScroll(); + this.onResize(); + this.onClickMask(); + }, 100); } } |