🐛 Fixed toggle theme color will refresh page.

This commit is contained in:
凡梦星尘
2022-10-23 16:05:23 +08:00
parent 1ae0ca2488
commit 913ae1821a
7 changed files with 77 additions and 91 deletions

View File

@@ -1,11 +1,6 @@
/* global NexT, CONFIG */
NexT.boot = {};
NexT.boot.activeThemeMode = function(){
NexT.utils.activeThemeMode();
};
NexT.boot.registerEvents = function() {
NexT.utils.registerScrollPercent();
@@ -39,13 +34,10 @@ NexT.boot.registerEvents = function() {
NexT.boot.refresh = function() {
NexT.utils.calSiteInfo();
NexT.utils.regSwitchThemeBtn();
if (!NexT.CONFIG.page.isPage) return;
NexT.utils.registerSidebarTOC();
//NexT.utils.replacePostCRLink();
NexT.utils.registerCopyCode();
NexT.utils.registerPostReward();
if(NexT.CONFIG.page.comments) {
@@ -89,7 +81,6 @@ NexT.boot.motion = function() {
};
document.addEventListener('DOMContentLoaded', () => {
NexT.boot.activeThemeMode();
NexT.boot.registerEvents();
NexT.boot.motion();
NexT.boot.refresh();