REMOVE commented-out debug code in chapter progression script for cleaner codebase
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8cbf873df0
commit
2a75dd5d00
|
|
@ -33,9 +33,6 @@ export default function observeChapterProgression() {
|
|||
targetBlock.focus({ preventScroll: true });
|
||||
}
|
||||
function handleChapterIndicatorPosition(targetLink) {
|
||||
// console.log('targetLink', targetLink);
|
||||
// console.log('targetLink.offsetTop', targetLink.offsetTop);
|
||||
// console.log('targetLink.offsetHeight', targetLink.offsetHeight);
|
||||
const targetPosition = targetLink.offsetTop;
|
||||
const targetHeight = targetLink.offsetHeight;
|
||||
let chapterIndicator = document.querySelector('.chapter_index__position-indicator');
|
||||
|
|
@ -44,8 +41,6 @@ export default function observeChapterProgression() {
|
|||
}
|
||||
|
||||
function handleSetLinkActive(targetLink) {
|
||||
// console.log('####################');
|
||||
// console.log(targetLink);
|
||||
const allLinks = document.querySelectorAll('.chapter_index__link');
|
||||
allLinks.forEach((link) => {
|
||||
link.classList.remove('active');
|
||||
|
|
@ -73,7 +68,6 @@ export default function observeChapterProgression() {
|
|||
relatedChapterLink.classList.remove('active');
|
||||
|
||||
if (entry.isIntersecting) {
|
||||
console.log('entry.isIntersecting', entry.isIntersecting);
|
||||
// Add 'active' class if observation target is inside viewport
|
||||
handleChapterIndicatorPosition(relatedChapterLink);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user