-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
解决执行时间不统一的问题
- Loading branch information
Showing
1 changed file
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
// ==UserScript== | ||
// @name 优化斗鱼/抖音web播放器 | ||
// @namespace https://www.liebev.site | ||
// @version 0.3 | ||
// @version 0.3.1 | ||
// @description 通过关闭直播间全屏时的背景虚化效果来解决闪屏的问题 | ||
// @author LiebeV | ||
// @match https://www.douyu.com/* | ||
// @match https://live.douyin.com/* | ||
// @icon https://www.google.com/s2/favicons?sz=64&domain=douyu.com | ||
// @grant GM_addStyle | ||
// @grant none | ||
// ==/UserScript== | ||
|
||
(function() { | ||
'use strict'; | ||
|
||
let css=` | ||
canvas{ | ||
visibility: hidden !important | ||
} | ||
.watermark-442a18{ | ||
display: none !important | ||
} | ||
.xgplayer-dynamic-bg{ | ||
visibility: hidden !important | ||
} | ||
` | ||
GM_addStyle(css) | ||
const css = ` | ||
._1Osm4fzGmcuRK9M8IVy3u6 { | ||
visibility: hidden !important; | ||
} | ||
.watermark-442a18 { | ||
display: none !important; | ||
} | ||
.xgplayer-dynamic-bg { | ||
visibility: hidden !important; | ||
} | ||
`; | ||
|
||
const style = document.createElement('style'); | ||
style.id = 'LiebeV'; | ||
style.type = 'text/css'; | ||
|
||
style.appendChild(document.createTextNode(css)); | ||
document.head.appendChild(style); | ||
})(); | ||
// 无法确认斗鱼虚化背景类名是否不变,暂时使用canvas代替类名定位,可能会关闭其他功能 | ||
// 关闭角落处文字水印,图片水印来自后台推流端,无法通过css定位 |