Skip to content

Commit fc90f1d

Browse files
authored
Update 优化斗鱼and抖音web播放器.user.js
解决执行时间不统一的问题
1 parent 66383bd commit fc90f1d

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed
Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
// ==UserScript==
22
// @name 优化斗鱼/抖音web播放器
33
// @namespace https://www.liebev.site
4-
// @version 0.3
4+
// @version 0.3.1
55
// @description 通过关闭直播间全屏时的背景虚化效果来解决闪屏的问题
66
// @author LiebeV
77
// @match https://www.douyu.com/*
88
// @match https://live.douyin.com/*
99
// @icon https://www.google.com/s2/favicons?sz=64&domain=douyu.com
10-
// @grant GM_addStyle
10+
// @grant none
1111
// ==/UserScript==
1212

1313
(function() {
1414
'use strict';
1515

16-
let css=`
17-
canvas{
18-
visibility: hidden !important
19-
}
20-
.watermark-442a18{
21-
display: none !important
22-
}
23-
.xgplayer-dynamic-bg{
24-
visibility: hidden !important
25-
}
26-
`
27-
GM_addStyle(css)
16+
const css = `
17+
._1Osm4fzGmcuRK9M8IVy3u6 {
18+
visibility: hidden !important;
19+
}
20+
.watermark-442a18 {
21+
display: none !important;
22+
}
23+
.xgplayer-dynamic-bg {
24+
visibility: hidden !important;
25+
}
26+
`;
27+
28+
const style = document.createElement('style');
29+
style.id = 'LiebeV';
30+
style.type = 'text/css';
31+
32+
style.appendChild(document.createTextNode(css));
33+
document.head.appendChild(style);
2834
})();
29-
// 无法确认斗鱼虚化背景类名是否不变,暂时使用canvas代替类名定位,可能会关闭其他功能
3035
// 关闭角落处文字水印,图片水印来自后台推流端,无法通过css定位

0 commit comments

Comments
 (0)