fix: video sharing dialog shows the top bar (#1246)

close #1246
This commit is contained in:
Hakadao
2025-01-05 04:25:34 +08:00
parent b301729f2a
commit 1b9555edda

View File

@@ -83,9 +83,21 @@ function isSupportedPages(): boolean {
}
}
export function isBlockedPages(): boolean {
if (
// https://github.com/BewlyBewly/BewlyBewly/issues/1246
/https?:\/\/(?:t\.)?bilibili\.com\/share\/card\/index.*/.test(currentUrl)
) {
return true
}
else {
return false
}
}
let beforeLoadedStyleEl: HTMLStyleElement | undefined
if (isSupportedPages()) {
if (isSupportedPages() && !isBlockedPages()) {
if (settings.value.adaptToOtherPageStyles)
useDark()
@@ -150,7 +162,7 @@ async function onDOMLoaded() {
document.body.appendChild(originalTopBar)
}
if (isSupportedPages()) {
if (isSupportedPages() && !isBlockedPages()) {
// Then inject the app
if (isHomePage()) {
injectApp()