diff --git a/source/js/bookmark.js b/source/js/bookmark.js index 0290c9c..8e3ae6a 100644 --- a/source/js/bookmark.js +++ b/source/js/bookmark.js @@ -26,7 +26,7 @@ document.addEventListener('DOMContentLoaded', () => { // Create a link element const link = document.querySelector('.book-mark-link'); // Scroll event - window.addEventListener('scroll', () => link.classList.toggle('book-mark-link-fixed', window.scrollY === 0)); + window.addEventListener('scroll', () => link.classList.toggle('book-mark-link-fixed', window.scrollY === 0), { passive: true }); // Register beforeunload event when the trigger is auto if (trigger === 'auto') { // Register beforeunload event diff --git a/source/js/schemes/muse.js b/source/js/schemes/muse.js index 801a8c4..291370e 100644 --- a/source/js/schemes/muse.js +++ b/source/js/schemes/muse.js @@ -57,5 +57,5 @@ document.addEventListener('DOMContentLoaded', () => { updateFooterPosition(); window.addEventListener('resize', updateFooterPosition); - window.addEventListener('scroll', updateFooterPosition); + window.addEventListener('scroll', updateFooterPosition, { passive: true }); }); diff --git a/source/js/utils.js b/source/js/utils.js index 148549a..7995394 100644 --- a/source/js/utils.js +++ b/source/js/utils.js @@ -189,7 +189,7 @@ NexT.utils = { index--; } this.activateNavByIndex(index); - }); + }, { passive: true }); backToTop && backToTop.addEventListener('click', () => { window.anime({