diff --git "a/\344\274\230\345\214\226\346\226\227\351\261\274and\346\212\226\351\237\263web\346\222\255\346\224\276\345\231\250.user.js" "b/\344\274\230\345\214\226\346\226\227\351\261\274and\346\212\226\351\237\263web\346\222\255\346\224\276\345\231\250.user.js" index 455bd39..299ef9c 100644 --- "a/\344\274\230\345\214\226\346\226\227\351\261\274and\346\212\226\351\237\263web\346\222\255\346\224\276\345\231\250.user.js" +++ "b/\344\274\230\345\214\226\346\226\227\351\261\274and\346\212\226\351\237\263web\346\222\255\346\224\276\345\231\250.user.js" @@ -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定位