From 3f48bb37ce42b4547981a9841ad30bd2547f987e Mon Sep 17 00:00:00 2001 From: Hakadao Date: Sun, 23 Jul 2023 15:38:20 +0800 Subject: [PATCH] chore: remove or comment out some unused things --- src/contentScripts/index.ts | 2 -- .../views/Favorites/Favorites.vue | 32 +++++++++---------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/contentScripts/index.ts b/src/contentScripts/index.ts index 67907816..58395915 100644 --- a/src/contentScripts/index.ts +++ b/src/contentScripts/index.ts @@ -22,8 +22,6 @@ if (isFirefox) { }) } else { - // Firefox `browser.tabs.executeScript()` requires scripts return a primitive value - document.addEventListener('DOMContentLoaded', () => { injectApp() }) diff --git a/src/contentScripts/views/Favorites/Favorites.vue b/src/contentScripts/views/Favorites/Favorites.vue index f37c11d4..bf86c7a5 100644 --- a/src/contentScripts/views/Favorites/Favorites.vue +++ b/src/contentScripts/views/Favorites/Favorites.vue @@ -45,22 +45,22 @@ onMounted(async () => { keyword.value, ) - if (favoriteVideosWrap.value) { - favoriteVideosWrap.value.addEventListener('scroll', () => { - // When you scroll to the bottom, they will automatically - // add the next page of data to the history list - if ( - favoriteVideosWrap.value.clientHeight - + favoriteVideosWrap.value.scrollTop - >= favoriteVideosWrap.value.scrollHeight - 20 - && favoriteResources.length > 0 - && !isLoading.value - ) { - if (activatedMediaId.value && !noMoreContent.value) - getFavoriteResources(activatedMediaId.value, currentPageNum.value++) - } - }) - } + // if (favoriteVideosWrap.value) { + // favoriteVideosWrap.value.addEventListener('scroll', () => { + // // When you scroll to the bottom, they will automatically + // // add the next page of data to the history list + // if ( + // favoriteVideosWrap.value.clientHeight + // + favoriteVideosWrap.value.scrollTop + // >= favoriteVideosWrap.value.scrollHeight - 20 + // && favoriteResources.length > 0 + // && !isLoading.value + // ) { + // if (activatedMediaId.value && !noMoreContent.value) + // getFavoriteResources(activatedMediaId.value, currentPageNum.value++) + // } + // }) + // } }) async function getFavoriteCategories() {