Skip to content

Commit

Permalink
Update 优化斗鱼and抖音web播放器.user.js
Browse files Browse the repository at this point in the history
解决执行时间不统一的问题
  • Loading branch information
LiebeV authored Mar 10, 2023
1 parent 66383bd commit fc90f1d
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions 优化斗鱼and抖音web播放器.user.js
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定位

0 comments on commit fc90f1d

Please sign in to comment.