perf: improve BewlyBewly inject speed

This commit is contained in:
Hakadao
2024-09-10 13:17:16 +08:00
parent c43577b511
commit bc3b9d283c
3 changed files with 9 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ import browser from 'webextension-polyfill'
import type { BewlyAppProvider } from '~/composables/useAppProvider'
import { useDark } from '~/composables/useDark'
import { OVERLAY_SCROLL_BAR_SCROLL } from '~/constants/globalEvents'
import { BEWLY_MOUNTED, OVERLAY_SCROLL_BAR_SCROLL } from '~/constants/globalEvents'
import { AppPage, LanguageType } from '~/enums/appEnums'
import { accessKey, settings } from '~/logic'
import { getUserID, isHomePage, scrollToTop } from '~/utils/main'
@@ -109,6 +109,7 @@ onBeforeMount(() => {
})
onMounted(() => {
window.dispatchEvent(new CustomEvent(BEWLY_MOUNTED))
// openVideoPageIfBvidExists()
if (isHomePage()) {