diff --git a/onpoint.js b/onpoint.js index 621b9fe..48aa165 100755 --- a/onpoint.js +++ b/onpoint.js @@ -9,6 +9,8 @@ let topicList; let topicLinks; let topicListSearch; +let pageNumberContainer; + const activeTopicLinkClass = 'active-topic-link'; const notMatchingSearchTermsClass = 'not-matching-search-terms'; const topicListSearchClass = 'topic-list-search'; @@ -19,6 +21,7 @@ function init() { slides[i].id = `slide${i}`; } topicList = createTopicList(); + pageNumberContainer = document.getElementById('page-number-container'); resumeOrGoToStart(); document.addEventListener('keydown', onKeyPressed); } @@ -46,6 +49,10 @@ function goToSlide(index) { [...newActiveTopicLinks].forEach(link => { link.classList.add(activeTopicLinkClass); }) + + if (pageNumberContainer) { + pageNumberContainer.textContent = index; + } } }