Add danmaku style blockers (#1228)

This commit is contained in:
the1812 2021-05-28 20:56:23 +08:00
parent 11c52ddb11
commit 1c23edd771
11 changed files with 49 additions and 4 deletions

1
min/disable-danmaku-highlights.min.js vendored Normal file
View File

@ -0,0 +1 @@
(()=>(n,a)=>a.toggleStyle(`\n.b-danmaku-high .b-danmaku-high-icon {\n display: none !important;\n}\n.b-danmaku-high .b-danmaku-high-text {\n margin: 0 !important;\n text-shadow: inherit;\n}\n.b-danmaku-high {\n display: block !important;\n padding: 0 !important;\n line-height: 1.125 !important;\n}\n`.trim(),"disable-danmaku-highlights"))();

1
min/disable-up-danmaku-style.min.js vendored Normal file
View File

@ -0,0 +1 @@
(()=>(n,a)=>a.toggleStyle(`\n.b-danmaku-up .b-danmaku-up-tip {\n display: none !important;\n}\n.b-danmaku-up {\n padding: 0 !important;\n line-height: 1.125 !important;\n background-color: transparent !important;\n border-radius: 0 !important;\n}\n`.trim(),"disable-up-danmaku-style"))();

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name Bilibili Evolved (Preview)
// @version 1.12.8
// @version 1.12.9
// @description Bilibili Evolved 的预览版, 可以抢先体验新功能.
// @author Grant Howard, Coulomb-G
// @copyright 2021, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)

View File

@ -688,6 +688,18 @@ Resource.manifest = {
key: 'scrollOutPlayerTriggerPlace',
items: ['视频顶部' ,'视频中间', '视频底部']
}
}
},
disableDanmakuHighlights: {
displayNames: {
disableDanmakuHighlights: '禁用高赞弹幕样式',
},
reloadable: true,
},
disableUpDanmakuStyle: {
displayNames: {
disableUpDanmakuStyle: '禁用UP主弹幕样式',
},
reloadable: true,
},
}
export const resourceManifest = Resource.manifest

View File

@ -258,6 +258,8 @@ export const settings = {
scrollOutPlayerTriggerPlace: '视频中间',
scrollOutPlayerAutoPause: true,
scrollOutPlayerAutoLightOn: true,
disableDanmakuHighlights: false,
disableUpDanmakuStyle: false,
cache: {},
}
const fixedSettings = {

2
src/global.d.ts vendored
View File

@ -521,6 +521,8 @@ declare global {
scrollOutPlayerTriggerPlace: string,
scrollOutPlayerAutoPause: boolean,
scrollOutPlayerAutoLightOn: boolean,
disableDanmakuHighlights: boolean,
disableUpDanmakuStyle: boolean,
}
const GM_info: MonkeyInfo
function GM_xmlhttpRequest(details: MonkeyXhrDetails): { abort: () => void }

View File

@ -0,0 +1,14 @@
export default resources.toggleStyle(`
.b-danmaku-high .b-danmaku-high-icon {
display: none !important;
}
.b-danmaku-high .b-danmaku-high-text {
margin: 0 !important;
text-shadow: inherit;
}
.b-danmaku-high {
display: block !important;
padding: 0 !important;
line-height: 1.125 !important;
}
`.trim(), 'disable-danmaku-highlights')

View File

@ -0,0 +1,11 @@
export default resources.toggleStyle(`
.b-danmaku-up .b-danmaku-up-tip {
display: none !important;
}
.b-danmaku-up {
padding: 0 !important;
line-height: 1.125 !important;
background-color: transparent !important;
border-radius: 0 !important;
}
`.trim(), 'disable-up-danmaku-style')

View File

@ -121,6 +121,8 @@
<checkbox indent="0" key="hideBangumiSponsors" dependencies=""></checkbox>
<checkbox indent="0" key="hideRecommendLive" dependencies=""></checkbox>
<checkbox indent="0" key="hideRelatedVideos" dependencies=""></checkbox>
<checkbox indent="0" key="disableDanmakuHighlights" dependencies=""></checkbox>
<checkbox indent="0" key="disableUpDanmakuStyle" dependencies=""></checkbox>
<category icon="activity">动态</category>
<checkbox indent="0" key="activityImageSaver" dependencies=""></checkbox>
<checkbox indent="0" key="foldComment" dependencies=""></checkbox>

View File

@ -1 +1 @@
1.12.8
1.12.9