From cc956f523a4271486e3a710219c646ac8b3b7a47 Mon Sep 17 00:00:00 2001 From: Nonimart Date: Tue, 24 Jun 2025 15:23:33 +0200 Subject: [PATCH] REFACTOR Cleaning useless code --- resources/js/singles/index-panel.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/resources/js/singles/index-panel.ts b/resources/js/singles/index-panel.ts index 9681f00..44c1370 100644 --- a/resources/js/singles/index-panel.ts +++ b/resources/js/singles/index-panel.ts @@ -51,7 +51,6 @@ export function toggleActiveTabPanel(dataIndex: string): void { // ******************************************************** function observeSommaireLinks(): void { - console.log('observeSommaireLinks'); const sommaireTitles: NodeListOf = document.querySelectorAll('.sommaire-index li a'); for (const title of sommaireTitles) { title.addEventListener('click', (e) => { @@ -75,8 +74,6 @@ function toggleActiveChapterLinkInIndexPanel(targetId: string): void { const indexPanel = document.querySelector('.index-panel') as HTMLElement; const currentLink = indexPanel.querySelector(`a[href="#${targetId}"]`) as HTMLElement; - console.log(currentLink); - if (!currentLink) return; for (const link of sommaireLinks) { @@ -86,23 +83,6 @@ function toggleActiveChapterLinkInIndexPanel(targetId: string): void { currentLink?.setAttribute('active', 'true'); } -// export function handleSmoothScrollToTitle(): void { -// const sommaireTitles: NodeListOf = document.querySelectorAll('.sommaire-index li a'); -// for (const title of sommaireTitles) { -// title.addEventListener('click', (e) => { -// e.preventDefault(); - -// const target = title.getAttribute('href'); -// if (!target) return; - -// const targetElement = document.querySelector(target); -// if (!targetElement) return; - -// targetElement.scrollIntoView({ behavior: 'smooth' }); -// }); -// } -// } - // ******************************************************** // ************* FOOTNOTES ********************************* // ********************************************************