Improved the comments plug-in load function, close #12

This commit is contained in:
凡梦星尘
2022-07-13 21:25:15 +08:00
parent bf55ada93c
commit 81cff8a5c2
50 changed files with 405 additions and 326 deletions

View File

@@ -1,8 +1,8 @@
/* global CONFIG */
window.addEventListener('tabs:register', () => {
let { activeClass } = CONFIG.comments;
if (CONFIG.comments.storage) {
let { activeClass } = NexT.CONFIG.comments;
if (NexT.CONFIG.comments.storage) {
activeClass = localStorage.getItem('comments_active') || activeClass;
}
if (activeClass) {
@@ -12,7 +12,7 @@ window.addEventListener('tabs:register', () => {
}
}
});
if (CONFIG.comments.storage) {
if (NexT.CONFIG.comments.storage) {
window.addEventListener('tabs:click', event => {
if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
const commentClass = event.target.classList[1];