File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change 1
1
// ==UserScript==
2
2
// @name 优化斗鱼/抖音web播放器
3
3
// @namespace https://www.liebev.site
4
- // @version 0.3
4
+ // @version 0.3.1
5
5
// @description 通过关闭直播间全屏时的背景虚化效果来解决闪屏的问题
6
6
// @author LiebeV
7
7
// @match https://www.douyu.com/*
8
8
// @match https://live.douyin.com/*
9
9
// @icon https://www.google.com/s2/favicons?sz=64&domain=douyu.com
10
- // @grant GM_addStyle
10
+ // @grant none
11
11
// ==/UserScript==
12
12
13
13
( function ( ) {
14
14
'use strict' ;
15
15
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 ) ;
28
34
} ) ( ) ;
29
- // 无法确认斗鱼虚化背景类名是否不变,暂时使用canvas代替类名定位,可能会关闭其他功能
30
35
// 关闭角落处文字水印,图片水印来自后台推流端,无法通过css定位
You can’t perform that action at this time.
0 commit comments