Skip to content

Commit cbddec5

Browse files
committed
fix(showav): compatiable with latest bilibili web player
1 parent 7cb3e10 commit cbddec5

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

scripts/ckylin-bilibili-display-video-id.user.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name 哔哩哔哩自定义视频信息条
33
// @namespace ckylin-bilibili-display-video-id
4-
// @version 1.19.2
4+
// @version 1.19.3
55
// @description 完全自定义你的视频标题下方信息栏,排序,增加,删除!
66
// @author CKylinMC
77
// @match https://www.bilibili.com/video*
@@ -668,7 +668,7 @@
668668
ct_span.innerHTML = config.defaultTextTime ? txttime : rawtime
669669
if (config.hideTime) ct_span.innerHTML += `
670670
<style>
671-
.video-data>span:nth-child(3),.video-data>span.pupdate{
671+
.video-info-detail span:nth-child(3),.video-info-detail span.pupdate{
672672
display:none!important;
673673
}
674674
</style>`;
@@ -687,7 +687,7 @@
687687
})();
688688
v_span.innerHTML += `
689689
<style>
690-
.video-data>span.view{
690+
.video-info-detail span.view{
691691
display:none!important;
692692
}
693693
</style>`;
@@ -706,7 +706,7 @@
706706
})();
707707
dmk_span.innerHTML += `
708708
<style>
709-
.video-data>span.dm{
709+
.video-info-detail span.dm{
710710
display:none!important;
711711
}
712712
</style>`;
@@ -722,7 +722,7 @@
722722
top_span.innerHTML = ''
723723
top_span.innerHTML += `
724724
<style>
725-
.video-data>span.rank,.video-data>a.honor{
725+
.video-info-detail span.rank,.video-info-detail a.honor{
726726
display:none!important;
727727
}
728728
</style>`;
@@ -996,7 +996,7 @@
996996
}
997997
console.log('ShowAV start inject')
998998

999-
CKTools.addStyle(`.video-container-v1>.copyright.item{display:none!important;}.video-container-v1>.video-data{flex-wrap: wrap!important;}`,"showav_patchNewPlayer","update",document.head);
999+
CKTools.addStyle(`.video-container-v1 .copyright.item{display:none!important;}.video-container-v1 .video-info-detail{flex-wrap: wrap!important;}`,"showav_patchNewPlayer","update",document.head);
10001000

10011001
if (config.forceGap) {
10021002
CKTools.addStyle(`#bilibiliShowInfos{margin-left: 12px!important;}`,"showav_forceGapCss","update",document.head);
@@ -1005,7 +1005,7 @@
10051005
}
10061006

10071007
if(config.forceRemoveAllItem){
1008-
CKTools.addStyle(`.video-container-v1 .video-data>.item{display:none!important}.video-data>span:not(#bilibiliShowInfos){display:none!important}`,"showav_hideall", "update", document.head);
1008+
CKTools.addStyle(`.video-container-v1 .video-info-detail>.item{display:none!important}.video-info-detail>span:not(#bilibiliShowInfos){display:none!important}`,"showav_hideall", "update", document.head);
10091009
}else{
10101010
CKTools.addStyle(``,"showav_hideall", "update", document.head);
10111011
}
@@ -1032,7 +1032,8 @@
10321032
}
10331033
globalinfos.p = getUrlParam("p") || getPageFromCid(unsafeWindow.cid, globalinfos);
10341034

1035-
const av_infobar = await waitForDom(".video-data");
1035+
//const av_infobar = await waitForDom(".video-data");
1036+
const av_infobar = await waitForDom(".video-info-detail");
10361037
if (!av_infobar) return log('Can not load info-bar in time.');
10371038
let av_root;
10381039
if (config.showInNewLine) {
@@ -2489,7 +2490,7 @@
24892490
`, 'showav_dragablecss', "unique", document.head);
24902491

24912492
CKTools.addStyle(`
2492-
.video-data-list{
2493+
.video-info-detail-list{
24932494
display: none!important;
24942495
}
24952496
#bilibiliShowInfos{

0 commit comments

Comments
 (0)