Update special danmaku styles (fix #3886)

This commit is contained in:
the1812 2022-12-29 22:34:33 +08:00
parent e2084715f4
commit 469bb6dd04
2 changed files with 35 additions and 19 deletions

View File

@ -4,7 +4,6 @@ import {
OptionsOfMetadata,
} from '@/components/define'
import { ComponentEntry } from '@/components/types'
import { toggleStyle } from '@/components/styled-component'
import { playerUrls } from '@/core/utils/urls'
import { addComponentListener } from '@/core/settings'
@ -33,10 +32,18 @@ const entry: ComponentEntry<Options> = ({ metadata, settings }) => {
})
}
const name = 'disableSpecialDanmaku'
export const component = defineComponentMetadata({
name,
entry,
displayName: '禁用特殊弹幕样式',
tags: [componentsTags.style],
...toggleStyle('disableSpecialDanmaku', () => import('./special-danmaku.scss'), entry),
instantStyles: [
{
name,
style: () => import('./special-danmaku.scss'),
},
],
urlInclude: playerUrls,
description: {
'zh-CN': '移除高赞弹幕或 UP 主弹幕的特殊样式, 弹幕内容不会移除.',

View File

@ -1,21 +1,30 @@
body.disable-highlight-danmaku-style .b-danmaku-high {
display: block !important;
padding: 0 !important;
line-height: 1.125 !important;
.b-danmaku-high-icon {
display: none !important;
}
.b-danmaku-high-text {
margin: 0 !important;
text-shadow: inherit;
body.disable-highlight-danmaku-style {
.bili-dm.bili-high,
.b-danmaku-high {
display: block !important;
padding: 0 !important;
line-height: 1.125 !important;
.bili-high-icon,
.b-danmaku-high-icon {
display: none !important;
}
.bili-high-text,
.b-danmaku-high-text {
margin: 0 !important;
text-shadow: inherit;
}
}
}
body.disable-up-danmaku-style .b-danmaku-up {
padding: 0 !important;
line-height: 1.125 !important;
background-color: transparent !important;
border-radius: 0 !important;
.b-danmaku-up-tip {
display: none !important;
body.disable-up-danmaku-style {
.bili-dm.bili-up,
.b-danmaku-up {
padding: 0 !important;
line-height: 1.125 !important;
background-color: transparent !important;
border-radius: 0 !important;
.bili-up-tip,
.b-danmaku-up-tip {
display: none !important;
}
}
}