feat: add es6.md cheatsheet.

This commit is contained in:
jaywcjlove
2022-10-31 15:18:50 +08:00
parent 8586f8a212
commit b258494776
7 changed files with 749 additions and 8 deletions

View File

@ -11,8 +11,6 @@ function anchorPoint() {
Array.from(document.querySelectorAll('.h2wrap-body .wrap')).forEach((elm) => elm.classList.remove('active'))
if (elm?.tagName === 'H3') {
elm?.parentElement?.parentElement?.classList.add('active');
const box = elm?.parentElement?.parentElement;
console.log('elm:2', box, document.querySelectorAll('.h2wrap-body .wrap'))
}
}
anchorPoint();
@ -23,7 +21,6 @@ function updateAnchor(element) {
tocanchor.classList.remove('is-active-link');
});
const anchor = element || document.querySelector(\`a.tocs-link[href='\${decodeURIComponent(window.location.hash)}']\`);
console.log('anchor', anchor)
if (anchor) {
anchor.classList.add('is-active-link');
}