hexo-theme-keep/source/js/post-toc.js

11 lines
299 B
JavaScript
Raw Normal View History

window.addEventListener('DOMContentLoaded', () => {
const navItems = document.querySelectorAll('.post-toc-wrap .post-toc li');
2020-09-07 15:56:13 +08:00
const toggleDom = document.querySelector('.page-aside-toggle');
if (navItems.length) {
toggleDom.style.display = 'flex';
window.utils.openToggle();
}
});