diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index a9858aa5..1405bdd6 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -36,6 +36,7 @@ const handlePageRefresh = ref<() => void>() const handleReachBottom = ref<() => void>() const handleThrottledPageRefresh = useThrottleFn(() => handlePageRefresh.value?.(), 500) const handleThrottledReachBottom = useThrottleFn(() => handleReachBottom.value?.(), 500) +const handleThrottledBackToTop = useThrottleFn(() => handleBackToTop(), 1000) const topBarRef = ref() const reachTop = ref(false) @@ -149,7 +150,7 @@ function changeActivatePage(pageName: AppPage) { if (scrollTop === 0) handleThrottledPageRefresh() else - handleBackToTop() + handleThrottledBackToTop() } return } @@ -315,7 +316,7 @@ provide('BEWLY_APP', { @change-page="pageName => changeActivatePage(pageName)" @settings-visibility-change="toggleSettings" @refresh="handleThrottledPageRefresh" - @back-to-top="handleBackToTop" + @back-to-top="handleThrottledBackToTop" /> ('BEWLY_APP', { diff --git a/src/contentScripts/views/Home/Home.vue b/src/contentScripts/views/Home/Home.vue index 0a431438..93280e46 100644 --- a/src/contentScripts/views/Home/Home.vue +++ b/src/contentScripts/views/Home/Home.vue @@ -1,4 +1,6 @@