mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Compatible with animated banner
This commit is contained in:
parent
10a3e87469
commit
295467df18
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -41,7 +41,7 @@
|
||||
"custom-control-background.min.js": "B9F366B251D1572ACE801FF6ECF15D4D1AAB3EA5A5B04B961B6F4310E2AB1A84",
|
||||
"custom-navbar.min.css": "96663A9903546E9E69A9E9BD619ED350E738D76DA7AB63C1DF5F1F878DAB272C",
|
||||
"custom-navbar.min.html": "3D3B6EE7D1E0C25803F94C63B2A52EAC8532ED433AA9A56D091253C4CFA3CD4E",
|
||||
"custom-navbar.min.js": "4FA403ECCD36CB626A7B37C0BDDBA83BFAC6FAD324FE3CEC182901AC3998D555",
|
||||
"custom-navbar.min.js": "12AB69A5A007868262D42A8CDFBBE6901CB265EFBF4C370C31FD41E1C3110C91",
|
||||
"custom-navbar-activities.min.js": "C2825BA81A3DD933346745F3FC8C45ED88932E180F65E7C8D7EED5CA3559A05E",
|
||||
"custom-navbar-blank.min.js": "DC2B75D5760EECD3A257785FDFBB7E5DEBF61CD9083C68DD5BCE468B093F54F3",
|
||||
"custom-navbar-category.min.js": "D348AC640ACB81D1F890F101B178D0234A1C819C873B90D706D6ADC0B9A27B05",
|
||||
|
||||
BIN
min/bundle.zip
BIN
min/bundle.zip
Binary file not shown.
2
min/custom-navbar.min.js
vendored
2
min/custom-navbar.min.js
vendored
File diff suppressed because one or more lines are too long
@ -69,6 +69,23 @@ export default (() => {
|
||||
true
|
||||
)
|
||||
})
|
||||
SpinQuery.select('#banner_link,.international-header .bili-banner').then(banner => {
|
||||
if (banner === null || !(banner instanceof HTMLElement)) {
|
||||
return
|
||||
}
|
||||
if (banner.style.backgroundImage || dq(banner, '.animated-banner')) {
|
||||
addSettingsListener('customNavbarTransparent', value => {
|
||||
if (!settings.hideBanner) {
|
||||
getNavbarElement().classList.toggle('transparent', value)
|
||||
}
|
||||
}, true)
|
||||
addSettingsListener('hideBanner', value => {
|
||||
if (settings.customNavbarTransparent) {
|
||||
getNavbarElement().classList.toggle('transparent', !value)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
SpinQuery.condition(() => dq('#banner_link,.international-header .bili-banner'),
|
||||
banner => banner === null ? false : Boolean((banner as HTMLElement).style.backgroundImage),
|
||||
(banner: HTMLElement) => {
|
||||
@ -78,16 +95,6 @@ export default (() => {
|
||||
blurLayer.style.backgroundImage = banner.style.backgroundImage
|
||||
blurLayer.setAttribute('data-image', banner.style.backgroundImage)
|
||||
})
|
||||
addSettingsListener('customNavbarTransparent', value => {
|
||||
if (!settings.hideBanner) {
|
||||
getNavbarElement().classList.toggle('transparent', value)
|
||||
}
|
||||
}, true)
|
||||
addSettingsListener('hideBanner', value => {
|
||||
if (settings.customNavbarTransparent) {
|
||||
getNavbarElement().classList.toggle('transparent', !value)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
const { Blank } = await import('./simple/custom-navbar-blank')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user