// ==UserScript==
// @name DouyuEx-RL 斗鱼直播间增强插件 (Reborn Lite)
// @namespace https://github.com/xayahcore/DouyuEx-RL
// @homepageURL https://github.com/xayahcore/DouyuEx-RL
// @supportURL https://github.com/xayahcore/DouyuEx-RL/issues
// @icon data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTA4cHgiIGhlaWdodD0iMTA4cHgiIHZpZXdCb3g9IjAgMCAxMDggMTA4IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPueyvueBteeQgzwvdGl0bGU+CiAgICA8ZyBpZD0i6aG16Z2iLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLnsr7ngbXnkIMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuODMwNzY5LCAwLjgzMDc2OSkiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik01My4xNjkyMzA3LDEwNi4zMzg0NjEgQzIzLjgyNzY5MjIsMTA2LjMzODQ2MSAwLDgyLjUxMDc2OTIgMCw1My4xNjkyMzA3IEMwLDUxLjAwMzA3NjkgMS43NzIzMDc3NSw0OS4yMzA3NjkyIDMuOTM4NDYxNSw0OS4yMzA3NjkyIEwzMy40NzY5MjMsNDkuMjMwNzY5MiBDMzUuNjQzMDc2OSw0OS4yMzA3NjkyIDM3LjQxNTM4NDUsNTEuMDAzMDc3IDM3LjQxNTM4NDYsNTMuMTY5MjMwNyBDMzcuNDE1Mzg0Niw2MS44MzM4NDYxIDQ0LjUwNDYxNTQsNjguOTIzMDc2OSA1My4xNjkyMzA3LDY4LjkyMzA3NjkgQzYxLjgzMzg0NjEsNjguOTIzMDc2OSA2OC45MjMwNzY5LDYxLjgzMzg0NjEgNjguOTIzMDc2OSw1My4xNjkyMzA3IEM2OC45MjMwNzY5LDUxLjAwMzA3NjkgNzAuNjk1Mzg0Niw0OS4yMzA3NjkyIDcyLjg2MTUzODUsNDkuMjMwNzY5MiBMMTAyLjQsNDkuMjMwNzY5MiBDMTA0LjU2NjE1NCw0OS4yMzA3NjkyIDEwNi4zMzg0NjEsNTEuMDAzMDc3IDEwNi4zMzg0NjEsNTMuMTY5MjMwNyBDMTA2LjMzODQ2MSw4Mi41MTA3NjkyIDgyLjUxMDc2OTIsMTA2LjMzODQ2MSA1My4xNjkyMzA3LDEwNi4zMzg0NjEgWiIgaWQ9Iui3r+W+hCIgZmlsbD0iIzMzMzYzQSI+PC9wYXRoPgogICAgICAgICAgICA8cGF0aCBkPSJNOC4wNzM4NDYxMiw1Ny4xMDc2OTIyIEMxMC4wNDMwNzY5LDgwLjI0NjE1MzcgMjkuNTM4NDYxNSw5OC40NjE1Mzg1IDUzLjE2OTIzMDcsOTguNDYxNTM4NSBDNzYuOCw5OC40NjE1Mzg1IDk2LjI5NTM4NDYsODAuMjQ2MTUzOSA5OC4yNjQ2MTU0LDU3LjEwNzY5MjIgTDc2LjUwNDYxNTQsNTcuMTA3NjkyMiBDNzQuNjMzODQ2MSw2OC4yMzM4NDYxIDY0Ljg4NjE1MzksNzYuOCA1My4xNjkyMzA3LDc2LjggQzQxLjQ1MjMwNzYsNzYuOCAzMS43MDQ2MTU0LDY4LjIzMzg0NjEgMjkuODMzODQ2MSw1Ny4xMDc2OTIyIEw4LjA3Mzg0NjEyLDU3LjEwNzY5MjIgWiIgaWQ9Iui3r+W+hCIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgICAgICAgICA8cGF0aCBkPSJNNTMuMTY5MjMwOCwzLjkzODQ2MTUgQzI1Ljk5Mzg0NjEsMy45Mzg0NjE1IDMuOTM4NDYxNSwyNS45OTM4NDYxIDMuOTM4NDYxNSw1My4xNjkyMzA3IEwzMy40NzY5MjMsNTMuMTY5MjMwNyBDMzMuNDc2OTIzLDQyLjMzODQ2MTUgNDIuMzM4NDYxNSwzMy40NzY5MjMgNTMuMTY5MjMwOCwzMy40NzY5MjMgQzY0LDMzLjQ3NjkyMyA3Mi44NjE1Mzg1LDQyLjMzODQ2MTUgNzIuODYxNTM4NSw1My4xNjkyMzA3IEwxMDIuNCw1My4xNjkyMzA3IEMxMDIuNCwyNS45OTM4NDYxIDgwLjM0NDYxNTQsMy45Mzg0NjE1IDUzLjE2OTIzMDgsMy45Mzg0NjE1IFoiIGlkPSLot6/lvoQiIGZpbGw9IiNENjA5MDkiPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTEwMi40LDU3LjEwNzY5MjIgTDcyLjg2MTUzODUsNTcuMTA3NjkyMiBDNzAuNjk1Mzg0Niw1Ny4xMDc2OTIyIDY4LjkyMzA3Nyw1NS4zMzUzODQ1IDY4LjkyMzA3NjksNTMuMTY5MjMwNyBDNjguOTIzMDc2OSw0NC41MDQ2MTU0IDYxLjgzMzg0NjEsMzcuNDE1Mzg0NiA1My4xNjkyMzA3LDM3LjQxNTM4NDYgQzQ0LjUwNDYxNTQsMzcuNDE1Mzg0NiAzNy40MTUzODQ2LDQ0LjUwNDYxNTQgMzcuNDE1Mzg0Niw1My4xNjkyMzA3IEMzNy40MTUzODQ2LDU1LjMzNTM4NDYgMzUuNjQzMDc2OSw1Ny4xMDc2OTIyIDMzLjQ3NjkyMyw1Ny4xMDc2OTIyIEwzLjkzODQ2MTUsNTcuMTA3NjkyMiBDMS43NzIzMDc2Miw1Ny4xMDc2OTIyIDAsNTUuMzM1Mzg0NSAwLDUzLjE2OTIzMDcgQzAsMjMuODI3NjkyMiAyMy44Mjc2OTIzLDAgNTMuMTY5MjMwNywwIEM4Mi41MTA3NjkyLDAgMTA2LjMzODQ2MSwyMy44Mjc2OTIyIDEwNi4zMzg0NjEsNTMuMTY5MjMwNyBDMTA2LjMzODQ2MSw1NS4zMzUzODQ2IDEwNC41NjYxNTQsNTcuMTA3NjkyMiAxMDIuNCw1Ny4xMDc2OTIyIFoiIGlkPSLot6/lvoQiIGZpbGw9IiMzMzM2M0EiPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTc2LjUwNDYxNTQsNDkuMjMwNzY5MyBMOTguMzYzMDc2OSw0OS4yMzA3NjkzIEM5Ni4yOTUzODQ2LDI2LjA5MjMwNzYgNzYuOCw3Ljg3NjkyMyA1My4xNjkyMzA3LDcuODc2OTIzIEMyOS41Mzg0NjE1LDcuODc2OTIzIDEwLjA0MzA3NjksMjYuMDkyMzA3NiA4LjA3Mzg0NjEyLDQ5LjIzMDc2OTMgTDI5LjkzMjMwNzYsNDkuMjMwNzY5MyBDMzEuNzA0NjE1NCwzOC4xMDQ2MTU0IDQxLjQ1MjMwNzYsMjkuNTM4NDYxNSA1My4xNjkyMzA3LDI5LjUzODQ2MTUgQzY0Ljg4NjE1MzksMjkuNTM4NDYxNSA3NC42MzM4NDYxLDM4LjEwNDYxNTQgNzYuNTA0NjE1NCw0OS4yMzA3NjkzIEw3Ni41MDQ2MTU0LDQ5LjIzMDc2OTMgWiIgaWQ9Iui3r+W+hCIgZmlsbD0iI0Q2MDkwOSI+PC9wYXRoPgogICAgICAgICAgICA8cGF0aCBkPSJNNTMuMTY5MjMwNyw3Ni44IEM0MC4xNzIzMDc2LDc2LjggMjkuNTM4NDYxNSw2Ni4xNjYxNTM5IDI5LjUzODQ2MTUsNTMuMTY5MjMwNyBDMjkuNTM4NDYxNSw0MC4xNzIzMDc2IDQwLjE3MjMwNzYsMjkuNTM4NDYxNSA1My4xNjkyMzA3LDI5LjUzODQ2MTUgQzY2LjE2NjE1MzksMjkuNTM4NDYxNSA3Ni44LDQwLjE3MjMwNzYgNzYuOCw1My4xNjkyMzA3IEM3Ni44LDY2LjE2NjE1MzkgNjYuMTY2MTUzOSw3Ni44IDUzLjE2OTIzMDcsNzYuOCBaIiBpZD0i6Lev5b6EIiBmaWxsPSIjMzMzNjNBIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik01My4xNjkyMzA3LDM3LjQxNTM4NDYgQzQ0LjUwNDYxNTQsMzcuNDE1Mzg0NiAzNy40MTUzODQ2LDQ0LjUwNDYxNTQgMzcuNDE1Mzg0Niw1My4xNjkyMzA3IEMzNy40MTUzODQ2LDYxLjgzMzg0NjEgNDQuNTA0NjE1NCw2OC45MjMwNzY5IDUzLjE2OTIzMDcsNjguOTIzMDc2OSBDNjEuODMzODQ2MSw2OC45MjMwNzY5IDY4LjkyMzA3NjksNjEuODMzODQ2MSA2OC45MjMwNzY5LDUzLjE2OTIzMDcgQzY4LjkyMzA3NjksNDQuNTA0NjE1NCA2MS44MzM4NDYxLDM3LjQxNTM4NDYgNTMuMTY5MjMwNywzNy40MTUzODQ2IEw1My4xNjkyMzA3LDM3LjQxNTM4NDYgWiIgaWQ9Iui3r+W+hCIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgICAgICAgICA8cGF0aCBkPSJNNDMuMzIzMDc2OSw1My4xNjkyMzA3IEM0My4zMjMwNzY5LDU4LjYwNzExMTQgNDcuNzMxMzUwMSw2My4wMTUzODQ2IDUzLjE2OTIzMDcsNjMuMDE1Mzg0NiBDNTguNjA3MTExNCw2My4wMTUzODQ2IDYzLjAxNTM4NDYsNTguNjA3MTExNCA2My4wMTUzODQ2LDUzLjE2OTIzMDcgQzYzLjAxNTM4NDYsNDcuNzMxMzUwMSA1OC42MDcxMTE0LDQzLjMyMzA3NjkgNTMuMTY5MjMwNyw0My4zMjMwNzY5IEM0Ny43MzEzNTAxLDQzLjMyMzA3NjkgNDMuMzIzMDc2OSw0Ny43MzEzNTAxIDQzLjMyMzA3NjksNTMuMTY5MjMwNyBaIiBpZD0i6Lev5b6EIiBmaWxsPSIjMzMzNjNBIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=
// @version 2026.11.13.01
// @description DouyuEx-RL 纯净重构版:源头全链路无缝最高画质(彻底告别开播二次切流卡顿)/ 活跃榜贡献值原生极速注入 / 物理单例长连接多路复用 / 优雅阻断P2P上传 / 彻底去除弹窗广告 / 剥离历史冗余死重
// @author xayahcore
// @match *://*.douyu.com/0*
// @match *://*.douyu.com/1*
// @match *://*.douyu.com/2*
// @match *://*.douyu.com/3*
// @match *://*.douyu.com/4*
// @match *://*.douyu.com/5*
// @match *://*.douyu.com/6*
// @match *://*.douyu.com/7*
// @match *://*.douyu.com/8*
// @match *://*.douyu.com/9*
// @match *://*.douyu.com/beta/*
// @match *://*.douyu.com/topic/*
// @match *://www.douyu.com/member/cp/getFansBadgeList
// @match *://passport.douyu.com/*
// @match *://msg.douyu.com/*
// @match *://yuba.douyu.com/*
// @match *://v.douyu.com/*
// @match *://cz.douyu.com/*
// @require https://registry.npmmirror.com/flv.js/1.6.2/files/dist/flv.min.js
// @require https://fastly.jsdelivr.net/npm/svgaplayerweb@2.3.1/build/svga.min.js
// @require https://registry.npmmirror.com/gif.js/0.2.0/files/dist/gif.js
// @require https://registry.npmmirror.com/three/0.80.0/files/build/three.min.js
// @require https://registry.npmmirror.com/xlsx/0.16.4/files/dist/xlsx.full.min.js
// @require https://registry.npmmirror.com/dompurify/2.3.6/files/dist/purify.min.js
// @grant GM_openInTab
// @grant GM_xmlhttpRequest
// @grant GM_setClipboard
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_listValues
// @grant GM_deleteValue
// @grant GM_cookie
// @grant GM_registerMenuCommand
// @grant unsafeWindow
// @run-at document-start
// @connect douyucdn.cn
// @connect douyu.com
// @connect qq.com
// @connect douyuex.com
// @connect dy.roozj.com
// @connect bilibili.com
// @connect huya.com
// @connect shadiao.app
// @connect registry.npmmirror.com
// @connect fastly.jsdelivr.net
// @connect cdn.jsdelivr.net
// @connect raw.githubusercontent.com
// @connect update.greasyfork.org
// @connect greasyfork.org
// @license MIT
// ==/UserScript==
function init(){initPkg_Safe("PopupPlayer_MergeDanmaku_ScriptHook",initPkg_PopupPlayer_MergeDanmaku_ScriptHook),initPkg_Safe("Shield_RemoveRepeatedDanmaku_ScriptHook",initPkg_Shield_RemoveRepeatedDanmaku_ScriptHook),initPkg_Safe("ShowDanmaku_ScriptHook",initPkg_ShowDanmaku_ScriptHook),initPkg_Safe("ScriptHook",initScriptHook),initPkg_Safe("ResponseHook",initResponseHook),initPkg_Safe("ShowDanmaku",initPkg_ShowDanmaku),initPkg_Safe("Update_checkVersion",Update_checkVersion),initPkg_Safe("KillP2P",initKillP2P),initPkg_Safe("HighestVideoQuality",initHighestVideoQuality),initPkg_Safe("NoLogin",initPkg_NoLogin),initPkg_Safe("Console",initPkg_Console),initPkg_Safe("Menu",initPkg_Menu),initPkg_Safe("Reset",initPkg_Reset),initPkg_Safe("FollowList",initPkg_FollowList)}function initPkg(){initPkg_Safe("DanmakuTail",initPkg_DanmakuTail),initPkg_Safe("ExIcon",initPkg_ExIcon),initPkg_Safe("ExPanel",initPkg_ExPanel),initPkg_Safe("RealAudience",initPkg_RealAudience),initPkg_Safe("CopyRealLive",initPkg_CopyRealLive),initPkg_Safe("TitleTime",initPkg_TitleTime),initPkg_Safe("RoomRevenue",initPkg_RoomRevenue),initPkg_Safe("RemoveAD",removeAD),initPkg_Safe("RemoveAD_Optimize",initPkg_RemoveAD),initPkg_Safe("FullScreen",initFullScreen),initPkg_Safe("Shield",initPkg_Shield),initPkg_Safe("BagInfo",initPkg_BagInfo),initPkg_Safe("Update",initPkg_Update),initPkg_Safe("Monitor",initPkg_Monitor),initPkg_Safe("Lottery",initPkg_Lottery),initPkg_Safe("PopupPlayer",initPkg_PopupPlayer),initPkg_Safe("PopupPlayer_MultiScreen",initPkg_PopupPlayer_MultiScreen),initPkg_Safe("PopupPlayer_MergeDanmaku",initPkg_PopupPlayer_MergeDanmaku),initPkg_Safe("LiveTool",initPkg_LiveTool),initPkg_Safe("VideoTools",initPkg_VideoTools),initPkg_Safe("ExpandTool",initPkg_ExpandTool),initPkg_Safe("Refresh",initPkg_Refresh),initPkg_Safe("BarrageLoop",initPkg_BarrageLoop),initPkg_Safe("FansContinue",initPkg_FansContinue),initPkg_Safe("Sign",initPkg_Sign),initPkg_Safe("BarragePanel",initPkg_BarragePanel),initPkg_Safe("AccountList",initPkg_AccountList),initPkg_Safe("ChatTools",initPkg_ChatTools),initPkg_Safe("MonthCost",initPkg_MonthCost),initPkg_Safe("RoomVip",initPkg_RoomVip),initPkg_Safe("DanmakuCollect",initPkg_DanmakuCollect),initPkg_Safe("RestoreYuba",initPkg_RestoreYuba),initPkg_Safe("ChangeDanmakuLengthLimit",initPkg_ChangeDanmakuLengthLimit),initPkg_Safe("CheckAnchorPocket",initPkg_CheckAnchorPocket),initPkg_Safe("LastLiveTime",initPkg_LastLiveTime),initPkg_Safe("FansBadgeList",initPkg_FansBadgeList),initPkg_Safe("VolumeMouseScrolling",initPkg_VolumeMouseScrolling)}function initPkg_Safe(t,n){try{"function"==typeof n&&n()}catch(e){n=e||{};console.error("[DouyuEx] 初始化失败:"+t+" —— "+(n.message||n))}}function initPkg_Timer(){initPkg_LevelTask_Timer(),initPkg_DisableCloseJump_Timer()}function initTimer(){initPkg_Timer()}function initStyles(){var e,t=document.head||document.documentElement;t?((e=document.createElement("style")).appendChild(document.createTextNode(`
body{position:relative;}
#ex-accountList-wrap {
left: -152px;
top: -16px;
/* max-height: 330px;
overflow-y: scroll;
scrollbar-width: none;
-ms-overflow-style: none; */
-webkit-transition: all .2s cubic-bezier(.22,.58,.12,.98);
-o-transition: all cubic-bezier(.22,.58,.12,.98) .2s;
-moz-transition: all cubic-bezier(.22,.58,.12,.98) .2s;
transition: all .2s cubic-bezier(.22,.58,.12,.98);
-webkit-transform-origin: 80% 0;
-moz-transform-origin: 80% 0;
-ms-transform-origin: 80% 0;
-o-transform-origin: 80% 0;
transform-origin: 80% 0;
-webkit-animation: scale-in-ease .5s cubic-bezier(.22,.58,.12,.98);
-moz-animation: scale-in-ease cubic-bezier(.22,.58,.12,.98) .5s;
-o-animation: scale-in-ease cubic-bezier(.22,.58,.12,.98) .5s;
animation: scale-in-ease .5s cubic-bezier(.22,.58,.12,.98);
}
/* #ex-accountList-wrap::-webkit-scrollbar {
display: none;
} */
.ex-accountList-item {
padding: 10px;
display: flex;
border-radius: 10px;
align-items: center;
}
.ex-accountList-item:hover {
background-color: rgb(244,244,244);
}
#ex-accountList-iframe {
display: none;
}
#ex-accountList-iframe2 {
display: none;
}
#ex-accountList-item-add {
padding: 10px;
text-align: center;
margin-bottom:0px;
border-radius: 10px;
}
#ex-accountList-item-add:hover {
background-color: rgb(244,244,244);
}
.ex-accountList-item__imgWrap {
flex: 0 0 25%;
}
.ex-accountList-item__img {
width: 50px;
height: 50px;
border-radius: 50%;
}
.ex-accountList-item__name {
line-height: 50px;
flex: 0 0 55%;
}
.ex-accountList-item__btn {
height: 30px;
width: 50px;
border-radius: 10px;
align-items: center;
flex: auto;
text-align: center;
line-height: 28px;
color: white;
background-color: rgb(245,108,108);
}
.ex-accountList-item__btn:hover {
background-color: rgb(247,137,137);
}
#ex-accountList-icon:hover > #ex-accountList-wrap {
display: block;
}
#ex-accountList-content {
background-color: white;
}.bag-info {
position: absolute;
background-color: rgba(0, 0, 0, 0.6);
color: white;
/* 原来是写死的 20×20 方块:只够显示 1~2 位数字,写上日期/「剩 29 天」就被裁成看不清的黑块。
改成按内容自适应,保证胶囊里能完整读出来。 */
min-width: 20px;
max-width: 100%;
padding: 0 3px;
border-radius: 3px;
font-size: 11px;
font-weight: 800;
line-height: 14px;
white-space: nowrap;
overflow: hidden;
box-sizing: border-box;
text-align: center;
z-index: 10;
bottom: 0;
}
.bag-button {
color: rgb(255, 255, 255);
text-align: center;
height: 15px;
line-height: 15px;
cursor: pointer;
margin-left: 5px;
background: rgb(70, 171, 255);
border-radius: 9px;
padding: 0px 10px;
right: 20px;
}.barragePanel__funcPanel {
position: absolute;
width: 232px;
height: 270px;
display: block;
background: white;
overflow-y: scroll;
}
.barragePanel__funcPanel::-webkit-scrollbar {display:none}
.barragePanel__muteTime {
/* position: absolute;
left: 25px;
top: 123px; */
z-index: 5;
}
.danmuContent-25f266 {
pointer-events: auto !important;
}
.thirdBtn-06cde5, .fourBtn-0845d4 {
/* 加宽按钮方便点击 */
margin-left: 0px !important;
margin-right: 0px !important;
padding: 0 17px !important;
}#copy-real-live {
cursor: pointer;
}
.Title-row-span, .Title-row-icon {
display: flex;
align-items: center;
justify-content: center;
}
.Title-row-icon {
margin-right: 4px;
}
.live-next-body #copy-real-live {
margin-left: 4px;
}.ChatBarrageCollect .TagItem {
height: auto !important;
}
.ChatBarrageCollect .TagItem-txt {
overflow: auto !important;
white-space: normal !important;
text-overflow: clip !important;
}/* ==================== 一级菜单精灵球样式与最右定位 ==================== */
.ex-icon {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
vertical-align: middle !important;
margin-left: auto !important; /* 核心:在 flex/流式布局中强推到最右侧 */
margin-right: 8px !important;
order: 9999 !important; /* 核心:Flexbox 排序最后,钉在最右侧 */
user-select: none !important;
cursor: pointer !important;
position: relative !important;
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.ex-icon a {
display: flex !important;
justify-content: center !important;
align-items: center !important;
width: 38px !important;
height: 38px !important;
border-radius: 50% !important;
background: rgba(255, 255, 255, 0.25) !important;
backdrop-filter: blur(12px) !important;
-webkit-backdrop-filter: blur(12px) !important;
transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.ex-icon:hover a {
background: rgba(255, 255, 255, 0.6) !important;
box-shadow: 0 4px 14px rgba(255, 102, 0, 0.35) !important;
transform: scale(1.15) rotate(15deg) !important;
}
.ex-icon:active a {
transform: scale(0.92) rotate(0deg) !important;
}
.ex-icon svg {
width: 28px !important;
height: 28px !important;
display: block !important;
transition: transform 0.22s ease !important;
}
/* ==========================================================================
文件地图(2026-11-05 整理)
1) L1/L2 令牌 —— 间距/尺寸/圆角/字号/颜色,唯一数值来源
2) 面板外壳 —— .miuix-modal / __body / __header / 滚动与遮罩
3) 旧版组件类 —— fans-panel__* / popup-panel__* / livetool__* 等
4) L3 组件层 .ui-* —— 卡片 / 行 / 按钮 / 单元格 / 操作条
5) 面板内定制 —— 各面板的内容级类名(登录态/资源格等)
6) 清理批次 A–E —— 2026-11 的统一化与债务清理(按主题归并)
⚠ 顺序即层叠:同权重下越靠后越优先。改顺序前先跑 tools/ui-diff.mjs 比对。
========================================================================== */
/* ==========================================================================
DouyuEx-RL MIUIX 统一设计系统 (Single Source of Truth)
涵盖 8 个三级控制台面板、二级 Dock 胶囊与全局控件,全量 1:1 复刻工业质感
========================================================================== */
/* ==========================================================================
L1 · 刻度(primitive):只放数字与色值,不含语义、不被面板直接引用
L2 · 语义(semantic):面板与组件只认这一层,改语义不用碰像素
L3 · 组件(component):.ui-* 只消费 L2
========================================================================== */
:root {
/* ---- L1 间距刻度(4px 基准,2px 细分) ---- */
--dx-space-0: 0px; --dx-space-1: 2px; --dx-space-2: 4px; --dx-space-3: 6px;
--dx-space-4: 8px; --dx-space-5: 10px; --dx-space-6: 12px; --dx-space-8: 16px;
--dx-space-10: 20px; --dx-space-20: 40px;
/* ---- L1 尺寸刻度 ---- */
--dx-size-2: 2px; --dx-size-4: 4px; --dx-size-6: 6px; --dx-size-8: 8px;
--dx-size-10: 10px; --dx-size-12: 12px; --dx-size-14: 14px; --dx-size-18: 18px;
--dx-size-20: 20px; --dx-size-26: 26px; --dx-size-32: 32px; --dx-size-38: 38px;
--dx-size-40: 40px; --dx-size-44: 44px; --dx-size-46: 46px; --dx-size-56: 56px;
/* ---- L1 圆角刻度 ---- */
--dx-radius-4: 4px; --dx-radius-6: 6px; --dx-radius-8: 8px; --dx-radius-10: 10px;
--dx-radius-14: 14px; --dx-radius-22: 22px; --dx-radius-full: 50%;
/* ---- L1 字阶 / 字重 / 行高 ---- */
--dx-font-11: 11px; --dx-font-115: 11.5px; --dx-font-12: 12px; --dx-font-14: 14px; --dx-font-16: 16px;
--dx-weight-400: 400; --dx-weight-500: 500; --dx-weight-600: 600; --dx-weight-700: 700;
--dx-leading-tight: 1.3; --dx-leading-normal: 1.5;
/* ---- L1 层级 / 动效 ---- */
--dx-z-sticky: 3; --dx-z-menu: 50; --dx-z-dock: 10000; --dx-z-panel: 100030;
--dx-dur-fast: 0.18s; --dx-dur-base: 0.2s; --dx-dur-slow: 0.3s;
--dx-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
/* ---- L1 颜色(墨 / 面 / 强调 / 状态) ---- */
--dx-ink-1: #0f172a; --dx-ink-2: #1e293b; --dx-ink-muted: #334155;
--dx-ink-inverse: #ffffff; --dx-accent: #0066ff; --dx-accent-deep: #0047b3;
--dx-state-ok: #047857; --dx-state-warn: #92400e; --dx-state-danger: #b91c1c;
--dx-tint: 255, 255, 255; /* 白片基色(改深浅只动这里) */
/* ---- L2 语义:表面 ---- */
--dx-surface-panel: rgba(var(--dx-tint), 0.65);
--dx-surface-card: rgba(var(--dx-tint), 0.42);
--dx-surface-row: rgba(var(--dx-tint), 0.82);
--dx-surface-bar: rgba(var(--dx-tint), 0.94);
--dx-surface-row-hover: rgba(var(--dx-tint), 0.97);
--dx-border-card: 1px solid rgba(var(--dx-tint), 0.75);
--dx-border-row: 1px solid rgba(var(--dx-tint), 0.95);
--dx-border-panel: 1px solid rgba(var(--dx-tint), 0.85);
/* ---- L2 语义:文字 ---- */
--dx-text-title: var(--dx-ink-1);
--dx-text-body: var(--dx-ink-2);
--dx-text-muted: var(--dx-ink-2);
--dx-text-on-accent: var(--dx-ink-inverse);
/* ---- L2 语义:间距/尺寸(组件只认这些) ---- */
--dx-space-row-gap: var(--dx-space-3);
--dx-space-card-pad-y: var(--dx-space-4);
--dx-space-card-pad-x: var(--dx-space-6);
--dx-space-card-gap: var(--dx-space-4);
--dx-size-icon: var(--dx-size-38);
--dx-size-control: var(--dx-size-44);
}
:root {
--miuix-modal-width: 380px;
--miuix-modal-height: 370px;
--miuix-modal-radius: 22px;
--miuix-modal-bg: var(--dx-surface-panel);
--miuix-modal-blur: blur(40px) saturate(220%);
--miuix-modal-border: var(--dx-border-panel);
--miuix-modal-shadow: inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.95), 0 16px 40px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
--miuix-card-bg: var(--dx-surface-card);
--miuix-card-border: var(--dx-border-card);
--miuix-card-radius: 14px;
--miuix-item-bg: var(--dx-surface-row);
--miuix-item-hover: var(--dx-surface-row-hover);
--miuix-item-border: var(--dx-border-row);
--miuix-blue: var(--dx-accent);
--miuix-blue-glow: rgba(0, 102, 255, 0.4);
--miuix-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* ==========================================================================
1. 二级 Dock 启动坞 (76px 晶透微胶囊 - 38px 圆角 - 56px 底座)
========================================================================== */
.ex-panel {
position: absolute;
bottom: 32px;
right: 0px;
min-width: max-content !important;
width: max-content !important;
height: 76px !important;
border-radius: 38px !important;
padding: 10px 18px !important;
box-sizing: border-box !important;
background: var(--miuix-modal-bg) !important;
backdrop-filter: var(--miuix-modal-blur) !important;
-webkit-backdrop-filter: var(--miuix-modal-blur) !important;
border: 1px solid rgba(255, 255, 255, 0.88) !important;
box-shadow: inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.98), 0 16px 40px rgba(15, 23, 42, 0.14) !important;
z-index: 10000 !important;
user-select: none;
display: none;
overflow: visible;
}
/* 二级菜单展开/折叠弹簧阻尼微上浮动画 */
.ex-panel.miuix-dock-in,
.ex-panel[style*="display: flex"],
.ex-panel[style*="display: block"] {
animation: miuix-dock-spring-in 0.28s var(--miuix-spring) forwards !important;
transform-origin: bottom right !important;
}
.ex-panel.miuix-dock-out {
animation: miuix-dock-spring-out 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
pointer-events: none !important;
}
@keyframes miuix-dock-spring-in {
0% { opacity: 0; transform: translateY(14px) scale(0.92); }
65% { opacity: 1; transform: translateY(-2px) scale(1.02); }
100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes miuix-dock-spring-out {
0% { opacity: 1; transform: translateY(0) scale(1); }
100% { opacity: 0; transform: translateY(10px) scale(0.94); }
}
.ex-panel__close {
position: absolute !important;
top: -9px !important;
right: -9px !important;
z-index: 10001 !important;
width: 26px !important;
height: 26px !important;
padding: 0 !important;
margin: 0 !important;
border: 1px solid rgba(0, 0, 0, 0.08) !important;
border-radius: 50% !important;
background: #ffffff !important;
color: var(--dx-text-body) !important;
font-size: var(--dx-font-16) !important;
font-weight: 700 !important;
line-height: 24px !important;
text-align: center !important;
cursor: pointer !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14) !important;
transition: all 0.2s var(--miuix-spring) !important;
}
.ex-panel__close:hover {
background: #ef4444 !important;
border-color: #ef4444 !important;
color: #ffffff !important;
transform: scale(1.15) rotate(90deg) !important;
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}
.ex-panel.ex-panel--floating {
position: fixed;
z-index: 10000;
}
.ex-panel__wrap {
display: flex !important;
align-items: center !important;
justify-content: center !important;
gap: 10px !important;
width: 100% !important;
height: 100% !important;
position: relative !important;
z-index: 1 !important;
}
.ex-panel__wrap > div {
width: 56px !important;
height: 56px !important;
border-radius: var(--dx-radius-14) !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
position: relative !important;
transition: all 0.22s var(--miuix-spring) !important;
cursor: pointer !important;
border: 1px solid rgba(255, 255, 255, 0.7) !important;
background: rgba(255, 255, 255, 0.45) !important;
box-sizing: border-box !important;
}
.ex-panel__wrap > div:hover {
background: rgba(255, 255, 255, 0.92) !important;
transform: translateY(-2.5px) !important;
border-color: rgba(0, 102, 255, 0.35) !important;
box-shadow: 0 6px 18px rgba(0, 102, 255, 0.24), inset 0 1px 1px #fff !important;
}
.ex-panel__wrap > div:active {
transform: translateY(0) scale(0.96) !important;
}
/* 磁吸指示器小胶囊 (24x4px 生机蓝) */
.ex-panel__indicator {
position: absolute !important;
bottom: 3px !important;
left: 50% !important;
width: 24px !important;
height: 4px !important;
border-radius: 2px !important;
background: var(--miuix-blue) !important;
box-shadow: 0 0 8px rgba(0, 102, 255, 0.65) !important;
transform: translateX(-50%) scaleX(0) !important;
opacity: 0 !important;
pointer-events: none !important;
transition: all 0.2s var(--miuix-spring) !important;
}
.ex-panel__wrap > div.is-active .ex-panel__indicator,
.ex-panel__wrap > div.ex-dock-active .ex-panel__indicator {
transform: translateX(-50%) scaleX(1) !important;
opacity: 1 !important;
}
.ex-panel__icon {
display: flex !important;
align-items: center !important;
justify-content: center !important;
position: relative !important;
width: 56px !important;
height: 56px !important;
padding: 0 !important;
margin: 0 !important;
}
.ex-panel__icon svg, .ex-panel__icon img {
width: 38px !important;
height: 38px !important;
max-width: 38px !important;
max-height: 38px !important;
object-fit: contain !important;
display: block !important;
pointer-events: none !important;
transition: transform 0.22s var(--miuix-spring) !important;
/* Phosphor 图标是 currentColor 线稿,统一给一个中性墨色;旧的内联彩色 SVG 自带 fill,不受影响 */
color: #334155 !important;
}
.ex-panel__wrap > div:hover .ex-panel__icon svg,
.ex-panel__wrap > div:hover .ex-panel__icon img {
transform: scale(1.08) !important;
}
.ex-panel__tip {
display: none;
background: #ff3b30;
border-radius: 50%;
width: 8px;
height: 8px;
top: 6px;
right: 6px;
position: absolute;
box-shadow: 0 0 6px rgba(255, 59, 48, 0.6);
}
/* ==========================================================================
2. 全量 8 个三级控制台统一尺寸与通透磨砂 (380×370 齐平三维铁壁)
========================================================================== */
.miuix-modal,
.sign-panel,
.fans-continue-panel,
.extool,
.livetool,
.bloop,
.exlottery,
.popup-player-panel,
.exupdate-panel {
width: var(--miuix-modal-width) !important;
max-width: calc(100vw - 24px) !important;
height: var(--miuix-modal-height) !important;
max-height: var(--miuix-modal-height) !important;
min-height: var(--miuix-modal-height) !important;
box-sizing: border-box !important;
padding: 0 !important;
overflow: clip !important; /* 不创建滚动容器:否则点内部单选/输入会被 scrollIntoView 把整块面板滚走(白板 bug) */
display: none;
z-index: 100030 !important;
border-radius: var(--miuix-modal-radius) !important;
background: var(--miuix-modal-bg) !important;
backdrop-filter: var(--miuix-modal-blur) !important;
-webkit-backdrop-filter: var(--miuix-modal-blur) !important;
border: var(--miuix-modal-border) !important;
box-shadow: var(--miuix-modal-shadow) !important;
color: var(--dx-text-title) !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
flex-direction: column !important;
}
/* 划过瞬间淡入 + 微上浮优雅动画 */
.miuix-modal.miuix-modal-in,
.sign-panel.miuix-modal-in,
.fans-continue-panel.miuix-modal-in,
.extool.miuix-modal-in,
.livetool.miuix-modal-in,
.bloop.miuix-modal-in,
.exlottery.miuix-modal-in,
.popup-player-panel.miuix-modal-in,
.exupdate-panel.miuix-modal-in,
.miuix-modal[style*="display: block"], .miuix-modal[style*="display:block"],
.miuix-modal[style*="display: flex"], .miuix-modal[style*="display:flex"],
.sign-panel[style*="display: block"], .sign-panel[style*="display:flex"],
.fans-continue-panel[style*="display: block"], .fans-continue-panel[style*="display:flex"],
.extool[style*="display: block"], .extool[style*="display:flex"],
.livetool[style*="display: block"], .livetool[style*="display:flex"],
.bloop[style*="display: block"], .bloop[style*="display:flex"],
.exlottery[style*="display: block"], .exlottery[style*="display:flex"],
.popup-player-panel[style*="display: block"], .popup-player-panel[style*="display:flex"],
.exupdate-panel[style*="display: block"], .exupdate-panel[style*="display:flex"] {
display: flex !important;
flex-direction: column !important;
opacity: 1 !important;
visibility: visible !important;
pointer-events: auto !important;
animation: miuix-modal-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
@keyframes miuix-modal-in {
0% { opacity: 0; transform: translateY(8px); }
100% { opacity: 1; transform: translateY(0); }
}
/* ==========================================================================
3. Level 3 模态吸顶 Header (顶栏满幅左右贴合,绝无漏缝)
========================================================================== */
.miuix-modal__header {
flex: 0 0 auto !important;
width: 100% !important;
margin: 0 !important;
padding: 12px 16px !important;
box-sizing: border-box !important;
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
background: rgba(255, 255, 255, 0.45) !important;
backdrop-filter: blur(28px) saturate(190%) !important;
-webkit-backdrop-filter: blur(28px) saturate(190%) !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.95), 0 2px 6px rgba(0, 0, 0, 0.03) !important;
z-index: 50 !important;
border-top-left-radius: var(--dx-radius-22) !important;
border-top-right-radius: var(--dx-radius-22) !important;
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
.miuix-modal__title-box {
display: flex !important;
align-items: center !important;
}
.miuix-modal__title {
font-size: var(--dx-font-14) !important;
font-weight: 700 !important;
color: var(--dx-text-title) !important;
letter-spacing: -0.2px !important;
}
.miuix-modal__close {
position: relative !important;
width: 26px !important;
height: 26px !important;
border-radius: var(--dx-radius-8) !important;
background: rgba(0, 0, 0, 0.06) !important;
border: none !important;
color: #475569 !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
cursor: pointer !important;
font-size: var(--dx-font-16) !important;
font-weight: 600 !important;
line-height: 1 !important;
text-align: center !important;
user-select: none !important;
padding: 0 !important;
margin: 0 !important;
box-sizing: border-box !important;
transition: background-color 0.18s var(--miuix-spring), color 0.18s ease, transform 0.2s var(--miuix-spring) !important;
}
.miuix-modal__close:hover {
background: #ef4444 !important;
color: #ffffff !important;
transform: scale(1.1) rotate(90deg) !important;
box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35) !important;
}
.miuix-modal__close:active {
transform: scale(0.95) !important;
}
/* ==========================================================================
4. 滚动条起始点统一在顶栏正下方:内容承载容器 (.miuix-modal__body)
========================================================================== */
.miuix-modal__body {
display: block !important;
padding-bottom: 0 !important; /* 粘底栏自己盖到下沿,body 不再留缝 */
flex: 1 1 auto !important;
min-height: 0 !important;
max-height: calc(var(--miuix-modal-height) - 52px) !important;
width: 100% !important;
overflow-y: overlay !important;
overflow-x: hidden !important;
box-sizing: border-box !important;
padding: 10px 0 0 0 !important; /* 底部交给粘底栏,bar 与面板下沿齐平 */ /* 底部留白必须小:sticky 相对 padding box 定位,留大会把按钮顶到内容中间 */ /* 底部让出粘底栏:滚到底时最后一行不被压 */
}
/* 统一 4px 极细微质感滚动条 */
.miuix-modal__body::-webkit-scrollbar,
.sign-panel::-webkit-scrollbar,
.fans-continue-panel::-webkit-scrollbar,
.extool::-webkit-scrollbar,
.livetool::-webkit-scrollbar,
.bloop::-webkit-scrollbar,
.exlottery::-webkit-scrollbar,
.popup-player-panel::-webkit-scrollbar,
.exupdate-panel::-webkit-scrollbar {
width: 4px !important;
}
.miuix-modal__body::-webkit-scrollbar-thumb,
.sign-panel::-webkit-scrollbar-thumb,
.fans-continue-panel::-webkit-scrollbar-thumb,
.extool::-webkit-scrollbar-thumb,
.livetool::-webkit-scrollbar-thumb,
.bloop::-webkit-scrollbar-thumb,
.exlottery::-webkit-scrollbar-thumb,
.popup-player-panel::-webkit-scrollbar-thumb,
.exupdate-panel::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.18) !important;
border-radius: var(--dx-radius-6) !important;
}
.miuix-modal__body::-webkit-scrollbar-track,
.sign-panel::-webkit-scrollbar-track,
.fans-continue-panel::-webkit-scrollbar-track,
.extool::-webkit-scrollbar-track,
.livetool::-webkit-scrollbar-track,
.bloop::-webkit-scrollbar-track,
.exlottery::-webkit-scrollbar-track,
.popup-player-panel::-webkit-scrollbar-track,
.exupdate-panel::-webkit-scrollbar-track {
background: transparent !important;
}
/* ==========================================================================
5. 通用四级卡片规范 (.fans-panel__card, .miuix-card, .livetool__cell)
========================================================================== */
.fans-panel__card,
.popup-panel__card,
.exupdate-panel__card,
.miuix-card,
.livetool__cell {
margin: 0 12px 10px 12px !important;
padding: 10px 14px !important;
box-sizing: border-box !important;
background: var(--miuix-card-bg) !important;
border: var(--miuix-card-border) !important;
border-radius: var(--miuix-card-radius) !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
backdrop-filter: blur(12px) !important;
-webkit-backdrop-filter: blur(12px) !important;
width: auto !important;
transition: all 0.2s var(--miuix-spring) !important;
}
.fans-panel__card:hover,
.popup-panel__card:hover,
.exupdate-panel__card:hover,
.miuix-card:hover,
.livetool__cell:hover {
background: rgba(255, 255, 255, 0.75) !important;
border-color: rgba(0, 102, 255, 0.35) !important;
box-shadow: 0 4px 12px rgba(0, 102, 255, 0.08) !important;
}
.fans-panel__card-header,
.popup-panel__card-header,
.exupdate-panel__card-header,
.miuix-card__header {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
margin-bottom: 8px !important;
padding-bottom: 4px !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}
.fans-panel__card-title,
.popup-panel__card-title,
.exupdate-panel__card-title,
.miuix-card__title {
font-size: var(--dx-font-14) !important;
font-weight: 700 !important;
color: var(--dx-text-title) !important;
}
/* ==========================================================================
5.5 直播间工具抽屉内部结构(单元格 / 标题 / 药丸操作 / 右侧开关)
原 LiveTool.css 独有声明全部上收至此,配合 iOS 折叠披露指示器。
========================================================================== */
.livetool__cell {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
flex-wrap: wrap !important;
gap: 8px 10px !important;
}
.livetool__cell_title {
display: flex !important;
align-items: center !important;
gap: 8px !important;
flex: 1 1 auto !important;
min-width: 0 !important;
margin: 0 !important;
padding: 0 !important;
cursor: pointer !important;
user-select: none !important;
}
/* 抽屉标题文字:全项目统一色值,五个抽屉严格一致(不再有宝蓝色遗留) */
.livetool__cell_title > span[id$="__title"] {
display: inline-flex !important;
align-items: center !important;
gap: 6px !important;
font-size: var(--dx-font-14) !important;
font-weight: 600 !important;
line-height: 1.3 !important;
color: var(--dx-text-title) !important;
transition: color 0.18s ease !important;
}
/* iOS 披露指示器:折叠时 ▸ 指向右,展开时 ▾ 指向下 */
.livetool__cell_title > span[id$="__title"]::after {
content: "" !important;
width: 5.5px !important;
height: 5.5px !important;
border-right: 1.6px solid #94a3b8 !important;
border-bottom: 1.6px solid #94a3b8 !important;
transform: rotate(-45deg) !important;
transition: transform 0.26s var(--miuix-spring), border-color 0.18s ease !important;
flex-shrink: 0 !important;
box-sizing: border-box !important;
}
.livetool__cell_title:hover > span[id$="__title"]::after {
border-color: #64748b !important;
}
.livetool__cell_title.is-open > span[id$="__title"] {
color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
}
.livetool__cell_title.is-open > span[id$="__title"]::after {
transform: rotate(45deg) !important;
border-color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
}
/* 标题旁的小胶囊操作按钮 (导出 / 导入 / 名单 / 面板) */
.livetool__cell_title span:not([id$="__title"]) {
font-size: var(--dx-font-11) !important;
font-weight: 600 !important;
color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
background: rgba(0, 102, 255, 0.12) !important;
border: 1px solid rgba(0, 102, 255, 0.25) !important;
padding: 2px 7px !important;
border-radius: var(--dx-radius-6) !important;
cursor: pointer !important;
box-shadow: 0 1px 3px rgba(0, 102, 255, 0.08) !important;
transition: all 0.18s var(--miuix-spring) !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
}
.livetool__cell_title span:not([id$="__title"]):hover {
background: var(--miuix-blue) !important;
color: #ffffff !important;
transform: translateY(-1px) !important;
box-shadow: 0 3px 8px rgba(0, 102, 255, 0.35) !important;
}
/* 右侧开关容器 */
.livetool__cell_option {
display: flex !important;
align-items: center !important;
justify-content: flex-end !important;
flex: 0 0 auto !important;
margin-left: auto !important;
padding: 0 !important;
}
/* 弹簧开关定位容器(原 .onoffswitch 包裹层,已并入统一引擎) */
.livetool__cell_switch {
display: flex !important;
align-items: center !important;
flex-shrink: 0 !important;
}
/* 弹幕投票的「重复投票」行内开关标签 */
.vote__repeat-label {
display: inline-flex !important;
align-items: center !important;
gap: 6px !important;
margin-right: 10px !important;
font-size: var(--dx-font-115) !important;
font-weight: 600 !important;
color: #334155 !important;
cursor: pointer !important;
user-select: none !important;
}
/* 抽屉展开后的内容面板(原 LiveTool.css 独有声明,已上收)
display: none 是五个抽屉的默认收起态,必须由本处统一声明:
Enter/Mute/Gift/Reply 此前各自在包级 CSS 里写了同一条,唯独弹幕投票漏了,
导致它的面板从加载起就露着(且折叠箭头读不到内联 display,状态与实际相反)。
注意这里不能加 !important —— 展开时各抽屉是通过内联 style.display = "block"
切显隐的,!important 会压过内联声明让面板再也打不开。 */
.vote__panel,
.enter__panel,
.mute__panel,
.gift__panel,
.reply__panel {
display: none;
width: 100% !important;
max-width: 100% !important;
box-sizing: border-box !important;
margin: 8px 0 2px 0 !important;
padding: 10px 12px !important;
border-radius: var(--dx-radius-10) !important;
background: rgba(255, 255, 255, 0.55) !important;
border: 1px solid rgba(255, 255, 255, 0.75) !important;
backdrop-filter: blur(8px) !important;
-webkit-backdrop-filter: blur(8px) !important;
}
/* 抽屉内的下拉框补充规范(与统一输入框同族) */
.livetool select {
background: rgba(255, 255, 255, 0.85) !important;
border: 1px solid rgba(0, 0, 0, 0.12) !important;
border-radius: var(--dx-radius-6) !important;
padding: 2px 6px !important;
font-size: var(--dx-font-12) !important;
outline: none !important;
color: var(--dx-text-title) !important;
}
/* 抽屉内的按钮微质感(含删除操作的危险红态) */
.livetool input[type="button"] {
border: none !important;
border-radius: var(--dx-radius-6) !important;
padding: 3px 10px !important;
font-size: var(--dx-font-115) !important;
font-weight: 600 !important;
cursor: pointer !important;
color: #ffffff !important;
background: linear-gradient(135deg, #2b7fff, #0055ff) !important;
box-shadow: 0 2px 6px rgba(0, 102, 255, 0.28) !important;
transition: all 0.18s var(--miuix-spring) !important;
outline: none !important;
}
.livetool input[type="button"]:hover {
background: linear-gradient(135deg, #3d8bff, #004de6) !important;
transform: translateY(-1px) !important;
box-shadow: 0 4px 10px rgba(0, 102, 255, 0.4) !important;
}
.livetool input[id$="__del"] {
background: rgba(239, 68, 68, 0.14) !important;
border: 1px solid rgba(239, 68, 68, 0.28) !important;
color: #ef4444 !important;
box-shadow: none !important;
}
.livetool input[id$="__del"]:hover {
background: #ef4444 !important;
color: #ffffff !important;
border-color: #ef4444 !important;
}
/* 版本更新日志列表(原 Update.css 内联规则上收至统一引擎) */
.exupdate-list {
margin: 0 !important;
padding: 0 !important;
list-style: none !important;
font-size: var(--dx-font-115) !important;
line-height: 18px !important;
color: #334155 !important;
}.exupdate-list li {
margin-bottom: var(--dx-space-4) !important;
word-break: break-word !important;
padding-left: 1.1em !important;
text-indent: -1.1em !important;
}
.exupdate-list li:last-child {
margin-bottom: 0 !important;
}
/* ==========================================================================
6. 选项列表与选项项 (.sign-options-list, .sign-option-item, .miuix-item)
========================================================================== */
.sign-options-list {
display: flex !important;
flex-direction: column !important;
gap: 6px !important;
margin-top: 2px !important;
}
.sign-option-item,
.miuix-item {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 12px !important;
padding: 7px 10px !important;
border-radius: var(--dx-radius-10) !important;
background: var(--miuix-item-bg) !important;
border: var(--miuix-item-border) !important;
cursor: pointer !important;
user-select: none !important;
transition: all 0.2s var(--miuix-spring) !important;
box-sizing: border-box !important;
}
.sign-option-item:hover,
.miuix-item:hover {
background: var(--miuix-item-hover) !important;
border-color: rgba(0, 102, 255, 0.35) !important;
transform: translateY(-1px) !important;
box-shadow: 0 3px 8px rgba(0, 102, 255, 0.08) !important;
}
.sign-option-text {
display: flex !important;
flex-direction: column !important;
flex: 1 1 auto !important;
min-width: 0 !important;
}
.sign-option-title {
font-size: var(--dx-font-12) !important;
font-weight: 600 !important;
color: var(--dx-text-title) !important;
line-height: 1.3 !important;
}
.sign-option-desc {
font-size: var(--dx-font-115) !important;
color: var(--dx-text-body) !important;
line-height: 1.2 !important;
margin-top: 1px !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
/* ==========================================================================
7. 统一澎湃蓝弹簧开关规范 (Switch: 宽 38px / 高 22px / 圆角 22px)
========================================================================== */
.sign-checkbox,
.miuix-switch,
input[type="checkbox"].sign-checkbox {
-webkit-appearance: none !important;
appearance: none !important;
position: relative !important;
width: 36px !important;
min-width: 36px !important;
height: 20px !important;
background: rgba(0, 0, 0, 0.14) !important;
border-radius: var(--dx-radius-22) !important;
cursor: pointer !important;
outline: none !important;
border: none !important;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
transition: background-color 0.28s var(--miuix-spring), box-shadow 0.28s ease !important;
flex-shrink: 0 !important;
margin: 0 !important;
padding: 0 !important;
display: inline-block !important;
vertical-align: middle !important;
}
.sign-checkbox::before,
.miuix-switch::before,
input[type="checkbox"].sign-checkbox::before {
content: "" !important;
display: block !important;
position: absolute !important;
top: 2px !important;
left: 2px !important;
width: 16px !important;
height: 16px !important;
background: #ffffff !important;
border-radius: 50% !important;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.22) !important;
transition: transform 0.32s var(--miuix-spring), width 0.2s ease !important;
}
.sign-checkbox:active::before,
.miuix-switch:active::before,
input[type="checkbox"].sign-checkbox:active::before {
width: 19px !important;
}
.sign-checkbox:checked,
.miuix-switch:checked,
input[type="checkbox"].sign-checkbox:checked {
background: var(--miuix-blue) !important;
box-shadow: 0 2px 8px var(--miuix-blue-glow) !important;
}
.sign-checkbox:checked::before,
.miuix-switch:checked::before,
input[type="checkbox"].sign-checkbox:checked::before {
transform: translateX(16px) !important;
}
.sign-checkbox:checked:active::before,
.miuix-switch:checked:active::before,
input[type="checkbox"].sign-checkbox:checked:active::before {
transform: translateX(12px) !important;
}
/* ==========================================================================
7.5 统一分段胶囊控制器 (.miuix-seg)
用于互斥单选(同屏播放模式 / 自动钓鱼模式 / 小尾巴位置等)。
原生 radio 圆点被彻底抹除,仅保留语义与 :checked 状态;
选中态依赖 input:checked + span 相邻兄弟选择器,不依赖 :has(),兼容性最稳。
========================================================================== */
.miuix-seg {
display: flex !important;
align-items: stretch !important;
gap: 2px !important;
padding: 2px !important;
margin-top: 2px !important;
background: rgba(0, 0, 0, 0.06) !important;
border-radius: var(--dx-radius-8) !important;
box-sizing: border-box !important;
}
.miuix-seg__item {
flex: 1 1 0 !important;
min-width: 0 !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
margin: 0 !important;
padding: 0 !important;
cursor: pointer !important;
user-select: none !important;
border-radius: var(--dx-radius-8) !important;
}
/* 原生圆点彻底隐藏(不用 display:none,保留键盘可聚焦与语义) */
.miuix-seg__item > input[type="radio"] {
position: absolute !important;
width: 1px !important;
height: 1px !important;
margin: -1px !important;
padding: 0 !important;
border: 0 !important;
overflow: hidden !important;
clip: rect(0 0 0 0) !important;
-webkit-appearance: none !important;
appearance: none !important;
opacity: 0 !important;
}
.miuix-seg__label {
display: block !important;
width: 100% !important;
padding: 5px 10px !important;
box-sizing: border-box !important;
text-align: center !important;
font-size: var(--dx-font-115) !important;
font-weight: 600 !important;
line-height: 1.4 !important;
color: var(--dx-text-body) !important;
border-radius: var(--dx-radius-8) !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
transition: background-color 0.2s var(--miuix-spring), color 0.18s ease, box-shadow 0.2s ease, transform 0.18s var(--miuix-spring) !important;
}
.miuix-seg__item:hover > .miuix-seg__label {
color: var(--dx-text-title) !important;
}
.miuix-seg__item > input[type="radio"]:checked + .miuix-seg__label {
background: #ffffff !important;
color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}
.miuix-seg__item:active > .miuix-seg__label {
transform: scale(0.97) !important;
}
.miuix-seg__item > input[type="radio"]:focus-visible + .miuix-seg__label {
box-shadow: 0 0 0 2px var(--miuix-blue-glow) !important;
}
/* 禁用态(自动钓鱼运行中锁定模式、小尾巴启用后锁定位置选项) */
.miuix-seg__item > input[type="radio"]:disabled + .miuix-seg__label {
opacity: 0.45 !important;
pointer-events: none !important;
}
/* ==========================================================================
8. 通用按钮微质感 (大弹簧操作按钮、胶囊操作按钮、送出按钮)
========================================================================== */
/* 操作区容器统一规范:左右留白必须与四级卡片保持一致(12px),
否则同一面板内的按钮会比卡片更宽/更窄,造成跨面板宽度不一致。 */
.fans-panel__action-wrap,
.popup-panel__action-wrap,
.exupdate-panel__action-wrap {
padding: 0 12px !important;
margin-top: 10px !important;
margin-bottom: 8px !important;
box-sizing: border-box !important;
}
.ex-btn-primary,
.fans-panel__submit-btn,
.popup-panel__submit-btn,
.exupdate-panel__submit-btn {
width: 100% !important;
height: 44px !important;
border-radius: var(--dx-radius-10) !important;
font-size: var(--dx-font-14) !important;
font-weight: 600 !important;
color: #ffffff !important;
background: linear-gradient(135deg, #2b7fff, #0055ff) !important;
box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35) !important;
border: none !important;
cursor: pointer !important;
transition: all 0.18s var(--miuix-spring) !important;
outline: none !important;
box-sizing: border-box !important;
}
.ex-btn-primary:hover,
.fans-panel__submit-btn:hover,
.popup-panel__submit-btn:hover,
.exupdate-panel__submit-btn:hover {
background: linear-gradient(135deg, #3d8bff, #004de6) !important;
transform: translateY(-1.5px) !important;
box-shadow: 0 6px 18px rgba(0, 102, 255, 0.45) !important;
}
.ex-btn-primary:active,
.fans-panel__submit-btn:active,
.popup-panel__submit-btn:active,
.exupdate-panel__submit-btn:active {
transform: translateY(0) scale(0.96) !important;
}
.ex-btn-primary:disabled,
.fans-panel__submit-btn:disabled,
.popup-panel__submit-btn:disabled,
.exupdate-panel__submit-btn:disabled {
background: #94a3b8 !important;
box-shadow: none !important;
cursor: not-allowed !important;
transform: none !important;
}
/* 胶囊辅助小按钮 (选择道具/选择礼物/粘贴) */
.ex-picker-btn,
.popup-panel__paste-btn {
/* 2026-11-05 债务清理:本体直接就是次级胶囊,不再靠外部 !important 覆盖 */
border: 1px solid rgba(15, 23, 42, 0.14) !important;
background: rgba(255, 255, 255, 0.92) !important;
color: var(--dx-accent-deep) !important;
border-radius: var(--dx-radius-8) !important;
height: 28px !important;
padding: 0 12px !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
font-size: var(--dx-font-115) !important;
font-weight: 600 !important;
line-height: 1 !important;
cursor: pointer !important;
outline: none !important;
box-shadow: none !important;
transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
}
.ex-picker-btn:hover,
.popup-panel__paste-btn:hover {
background: rgba(0, 102, 255, 0.18) !important;
transform: translateY(-1px) !important;
}
/* 送出/执行小按钮 */
.ex-send-btn {
border: 1px solid rgba(15, 23, 42, 0.14) !important;
background: rgba(255, 255, 255, 0.92) !important;
color: var(--dx-accent-deep) !important;
border-radius: var(--dx-radius-6) !important;
padding: 4px 12px !important;
font-size: var(--dx-font-115) !important;
font-weight: 600 !important;
cursor: pointer !important;
outline: none !important;
box-shadow: 0 2px 6px rgba(0, 102, 255, 0.3) !important;
transition: all 0.18s var(--miuix-spring) !important;
}
.ex-send-btn:hover {
background: linear-gradient(135deg, #3d8bff, #004de6) !important;
transform: translateY(-1px) !important;
box-shadow: 0 4px 10px rgba(0, 102, 255, 0.4) !important;
}
.ex-send-btn:active {
transform: scale(0.95) !important;
}
/* ==========================================================================
9. 通用输入框、下拉选单与文本域样式隔离 (绝不污染斗鱼原生播放器)
========================================================================== */
.miuix-modal input[type="text"],
.miuix-modal input[type="number"],
.miuix-modal textarea,
.miuix-modal select,
.sign-panel input[type="text"],
.sign-panel input[type="number"],
.fans-continue-panel input[type="number"],
.extool input[type="text"],
.extool input[type="number"],
.livetool input[type="text"],
.livetool input[type="number"],
.bloop input[type="text"],
.popup-player-panel input[type="text"] {
border: 1px solid rgba(0, 0, 0, 0.12) !important;
border-radius: var(--dx-radius-6) !important;
background: rgba(255, 255, 255, 0.8) !important;
padding: 3px 6px !important;
font-size: var(--dx-font-115) !important;
outline: none !important;
color: var(--dx-text-title) !important;
box-sizing: border-box !important;
transition: all 0.18s ease !important;
}
.miuix-modal input[type="text"]:focus,
.miuix-modal input[type="number"]:focus,
.miuix-modal textarea:focus,
.miuix-modal select:focus,
.sign-panel input[type="text"]:focus,
.extool input[type="text"]:focus,
.livetool input[type="text"]:focus,
.bloop input[type="text"]:focus,
.popup-player-panel input[type="text"]:focus {
border-color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
box-shadow: 0 0 0 2px var(--miuix-blue-glow) !important;
}
/* 状态标签与任务日志终端 */
.sign-status-tag {
font-size: var(--dx-font-11) !important;
color: #10b981 !important;
font-weight: 600 !important;
}
.sign-log-box {
min-height: 52px !important;
max-height: 72px !important;
margin-top: 4px !important;
overflow-y: auto !important;
font-size: var(--dx-font-11) !important;
color: #334155 !important;
background: rgba(241, 245, 249, 0.5) !important;
border: 1px solid rgba(0, 0, 0, 0.04) !important;
border-radius: var(--dx-radius-8) !important;
padding: 6px 10px !important;
line-height: 1.45 !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
box-sizing: border-box !important;
}
.sign-log-box::-webkit-scrollbar {
width: 4px !important;
}
.sign-log-box::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2) !important;
border-radius: var(--dx-radius-6) !important;
}
.sign-log-box::-webkit-scrollbar-track {
background: transparent !important;
}
/* ==========================================================================
10. MIUIX 礼物徽章选择组件 (可点击礼物徽章替代繁琐 ID 输入)
========================================================================== */
.miuix-gift-row {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 8px !important;
margin-top: 2px !important;
}
.miuix-gift-badge {
display: inline-flex !important;
align-items: center !important;
gap: 6px !important;
background: rgba(255, 255, 255, 0.75) !important;
border: 1px solid rgba(0, 102, 255, 0.25) !important;
border-radius: var(--dx-radius-8) !important;
padding: 3px 8px !important;
cursor: pointer !important;
user-select: none !important;
transition: all 0.2s var(--miuix-spring) !important;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
max-width: 170px !important;
}
.miuix-gift-badge:hover {
background: rgba(255, 255, 255, 0.95) !important;
border-color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
transform: translateY(-1px) !important;
box-shadow: 0 3px 8px var(--miuix-blue-glow) !important;
}
.miuix-gift-badge:active {
transform: scale(0.96) !important;
}
.miuix-gift-badge__icon {
width: 24px !important;
height: 24px !important;
object-fit: contain !important;
border-radius: var(--dx-radius-6) !important;
flex-shrink: 0 !important;
}
.miuix-gift-badge__name {
font-size: var(--dx-font-115) !important;
font-weight: 600 !important;
color: var(--dx-text-title) !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
.miuix-gift-badge__arrow {
font-size: var(--dx-font-14) !important;
color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
font-weight: bold !important;
line-height: 1 !important;
margin-left: 2px !important;
}.miuix-gift-action-wrap {
display: flex !important;
align-items: center !important;
gap: 6px !important;
margin-left: auto !important;
flex: 1 0 100%;
justify-content: flex-end;
}
/* ==========================================================================
11. Level 5 模态大选择器 (礼物大盘与背包双流资产选择器)
========================================================================== */
.ex-gift-picker-mask {
position: fixed !important;
top: 0 !important;
left: 0 !important;
width: 100vw !important;
height: 100vh !important;
background: rgba(15, 23, 42, 0.42) !important;
backdrop-filter: blur(8px) !important;
-webkit-backdrop-filter: blur(8px) !important;
z-index: 100080 !important;
transition: opacity 0.2s ease !important;
}
.ex-gift-picker-modal {
position: fixed !important;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
width: 520px !important;
max-width: 92vw !important;
height: 420px !important;
max-height: 85vh !important;
border-radius: var(--dx-radius-22) !important;
background: rgba(255, 255, 255, 0.8) !important;
backdrop-filter: blur(40px) saturate(220%) !important;
-webkit-backdrop-filter: blur(40px) saturate(220%) !important;
border: 1px solid rgba(255, 255, 255, 0.95) !important;
box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.95), 0 24px 60px rgba(15, 23, 42, 0.25) !important;
display: flex !important;
flex-direction: column !important;
overflow: hidden !important;
z-index: 100090 !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
color: var(--dx-text-title) !important;
user-select: none !important;
}
.ex-gift-picker-modal.miuix-modal-in {
animation: miuix-picker-in 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
.ex-gift-picker-modal.miuix-modal-out {
animation: miuix-picker-out 0.16s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
@keyframes miuix-picker-in {
0% { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes miuix-picker-out {
0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
100% { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
}
.ex-gift-picker__header {
flex: 0 0 54px !important;
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
padding: 0 16px !important;
background: rgba(255, 255, 255, 0.5) !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
gap: 12px !important;
}
.ex-gift-picker__tabs {
display: flex !important;
background: rgba(0, 0, 0, 0.06) !important;
border-radius: var(--dx-radius-8) !important;
padding: 2px !important;
gap: 2px !important;
}
.ex-gift-picker__tab {
border: none !important;
background: transparent !important;
padding: 4px 12px !important;
font-size: var(--dx-font-12) !important;
font-weight: 600 !important;
color: var(--dx-text-body) !important;
border-radius: var(--dx-radius-8) !important;
cursor: pointer !important;
transition: all 0.18s ease !important;
outline: none !important;
}
.ex-gift-picker__tab.is-active {
background: #ffffff !important;
color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}
.ex-gift-picker__search {
flex: 1 1 auto !important;
height: 32px !important;
border-radius: var(--dx-radius-8) !important;
border: 1px solid rgba(0, 0, 0, 0.12) !important;
background: rgba(255, 255, 255, 0.85) !important;
padding: 4px 10px !important;
font-size: var(--dx-font-12) !important;
color: var(--dx-text-title) !important;
outline: none !important;
transition: all 0.18s ease !important;
}
.ex-gift-picker__search:focus {
border-color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
box-shadow: 0 0 0 2px var(--miuix-blue-glow) !important;
}
.ex-gift-picker__close {
border: none !important;
background: transparent !important;
font-size: var(--dx-font-16) !important;
line-height: 1 !important;
color: var(--dx-text-body) !important;
cursor: pointer !important;
width: 28px !important;
height: 28px !important;
border-radius: var(--dx-radius-6) !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
transition: all 0.16s ease !important;
}
.ex-gift-picker__close:hover {
background: rgba(0, 0, 0, 0.08) !important;
color: var(--dx-text-title) !important;
}
.ex-gift-picker__body {
flex: 1 1 auto !important;
overflow-y: auto !important;
padding: 14px !important;
box-sizing: border-box !important;
}
.ex-gift-picker__body::-webkit-scrollbar {
width: 4px !important;
}
.ex-gift-picker__body::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2) !important;
border-radius: var(--dx-radius-6) !important;
}
.ex-gift-grid {
display: grid !important;
grid-template-columns: repeat(4, 1fr) !important;
gap: 10px !important;
}
.ex-gift-cell {
display: flex !important;
flex-direction: column !important;
align-items: center !important;
justify-content: center !important;
padding: 10px 8px !important;
border-radius: var(--dx-radius-14) !important;
background: rgba(255, 255, 255, 0.6) !important;
border: 1px solid rgba(255, 255, 255, 0.9) !important;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
cursor: pointer !important;
transition: all 0.18s var(--miuix-spring) !important;
text-align: center !important;
}
.ex-gift-cell:hover {
background: rgba(255, 255, 255, 0.95) !important;
border-color: rgba(0, 102, 255, 0.4) !important;
transform: translateY(-2px) !important;
box-shadow: 0 4px 12px var(--miuix-blue-glow) !important;
}
.ex-gift-cell:active {
transform: scale(0.96) !important;
}
.ex-gift-cell__img {
width: 44px !important;
height: 44px !important;
object-fit: contain !important;
margin-bottom: 6px !important;
}
.ex-gift-cell__name {
font-size: var(--dx-font-115) !important;
font-weight: 600 !important;
color: var(--dx-text-title) !important;
line-height: 1.25 !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
width: 100% !important;
}
.ex-gift-cell__price {
font-size: var(--dx-font-11) !important;
color: var(--dx-text-body) !important;
margin-top: 2px !important;
}
/* ==========================================================================
12. 弹幕小尾巴(聊天栏按钮 / 独立微悬浮面板 / 面板内控件)
原 DanmakuTail.css 独有声明全部上收至此,实现全文件归并。
========================================================================== */
/* 聊天工具栏的「尾」按钮 */
.ChatToolBar-DanmakuTail {
display: inline-block !important;
vertical-align: middle !important;
width: 18px !important;
height: 18px !important;
border-radius: var(--dx-radius-6) !important;
margin-right: 8px !important;
color: #bbb !important;
cursor: pointer !important;
}
.ChatToolBar-DanmakuTail-tip {
width: 18px !important;
height: 18px !important;
text-align: center !important;
line-height: 18px !important;
border-radius: var(--dx-radius-6) !important;
font-size: var(--dx-font-12) !important;
color: #fff !important;
cursor: pointer !important;
box-sizing: border-box !important;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAPFBMVEUAAADKy8zKy8zExMzKy83Ky83KzMzKzM7Kys3Ky8zKy83Jy8zJy83Ky8zLzMzJzMzIyM3MzMzKzMzKy8zUpkOsAAAAE3RSTlMA5PgF2qdrQ+rqysOOhzw3HBnqZkz8cgAAAN5JREFUOMuNlEkOAyEMBNs2y+xL/P+/JgoJaGCAqZOFSk0fLOOL7M7ONLBGeDCTdZsgcq6kdzAtBwLiSauMPoR5ow2Mx4dj1CZ0ArJoh1Ww/Quh5Be1w3F0apaD1a5kMSVJLyRphuknEYaGpIEXuC7pD4YWnaITuUiIdKRkVCRNRlUq+te+a0p4Ujy9ZkMpIaeUgJrEld6aYAxZJS2nF+hGwnUwmHOp/HSCzffybn1dubyZww47aQfaIGtPWgQ4O1Hj8fRgQPzYKOQFgWMhvlfWExHZnJ3M9RzSbN0eYt4fdzsuAVjiHAAAAABJRU5ErkJggg==) 50% / 18px 18px no-repeat !important;
}
[data-mantine-color-scheme=dark] .ChatToolBar-DanmakuTail-tip {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAABGdBTUEAALGPC/xhBQAACklpQ0NQc1JHQiBJRUM2MTk2Ni0yLjEAAEiJnVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/stRzjPAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAJcEhZcwAACxMAAAsTAQCanBgAAAIxSURBVFiF1dixS1tRFMfxT16fuomDHcQs4h8giMVFXPo/lDpI5y710T+gf0K5dOlcuhUKHZ2Di7QInUW6JDjYIXSLDulwk5Imz5f3EpO0P8jy3rn3fDnv3HNzTq3b7RpWlmVL2MUeDlDHFpaxipWRRfnq4Bfavd8VzvAd5yGEu+EFtWGgLMs28ArH2CzpuIo6+IlPeBtCaOYC9aJyiA8zAsnTDY7Q6EcrGXh5iPdzhIHHPZ+H/Qe1brcry7I6LnoGi1ALT0II14/a7fYS3uDpgmCIB+Xu9PS0kWIfz4qsQwi1h/KcZdnosY46xpcEO1ifB8yY/Taxl4h1pmxdmbUOUmyXtS4Id6EqRLmeYm0GG0+qrUQFoIfQmCgvJ+KR+xdgYDVVIaGLNhz3OUvm30paFqas42lVGaiKJjmVlYGyLOsWRWnS0jAx0KDTPLBpc+n/yqE5Xap/aaIcGn42CH6f4zI2EwENb17l3aDNfVCVgOZwl0nFLmBstR533IvWVTDvpGLfNPJfOs/5tPlRwu5Xgtti6Gq6L4olo9tO8cMDtz5T5Fo7QXOc1bTXQYX9rhKx157aQVnoArsOzmonJyf7+Gy+HWueWnieiB3rxwXDEIcP5/1WegNfLS5KN9gNITQTCCFc4wUuFwBziaP+WGZw+tHAS5F2Xmr1fDb6D/IGVnW8Fvv9dbPpalti3r7rfZ0/GgHqQS2JQ4gdsdXeFvu3NZON9G7FAtwUy8w3XOSN9H4DKHngjnga2TgAAAAASUVORK5CYII=) 50% / 18px 18px no-repeat !important;
}
.ChatToolBar-DanmakuTail-tip-active,
.ChatToolBar-DanmakuTail-tip:hover {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAPFBMVEUAAAD6aDP7ZTD2cUHxeU/pjGvmkHPfjnH4azj4bDruf1fshWHrhmLpjW3njm3kk3/ugFnugVn/XSP+YCg/+VboAAAAEnRSTlMA/P3z4XQyCPr5za2namIOx8bnayGzAAAA3klEQVQ4y43U2w6EIAxF0dNyc7xP+///Ook6EEHA/UTMSukDEUdhna0hVokpD8ZOy4aY/5I8pTT6iwRHUo1dOJD7SKOPO+5iaUYe2EbptAcs/4VQdo1aMWk0NTXDShdZmITkVkIGQ38SgRtIzhhaR3KlkGKnaGI3hFgHJVFBkkQVFfvXrmsivFk8fc0OJUJeiYAa0sreklJwtpKUJwY9INwPA0yOyksNbP4un57vXD7ezOiElaQTLQh7D40b4Duj2L/9YSA4bizkAs78SPpMdo/YtkzWDPffIRk7r+eYH6dAOJwNbfZEAAAAAElFTkSuQmCC) 50% / 18px 18px no-repeat !important;
}
.ChatToolBar-DanmakuTail-Panel {
position: fixed !important;
width: 270px !important;
border-radius: var(--dx-radius-14) !important;
background: rgba(255, 255, 255, 0.78) !important;
backdrop-filter: blur(36px) saturate(220%) !important;
-webkit-backdrop-filter: blur(36px) saturate(220%) !important;
border: 1px solid rgba(255, 255, 255, 0.95) !important;
box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.95), 0 16px 40px rgba(15, 23, 42, 0.16) !important;
padding: 12px 14px !important;
box-sizing: border-box !important;
z-index: 100050 !important;
display: none;
color: var(--dx-text-title) !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
user-select: none !important;
}
.DanmakuTail-input {
width: 100% !important;
height: 32px !important;
border-radius: var(--dx-radius-8) !important;
border: 1px solid rgba(0, 0, 0, 0.12) !important;
background: rgba(255, 255, 255, 0.85) !important;
padding: 4px 8px !important;
font-size: var(--dx-font-12) !important;
color: var(--dx-text-title) !important;
outline: none !important;
box-sizing: border-box !important;
margin-bottom: 8px !important;
}
.DanmakuTail-input:focus {
border-color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
box-shadow: 0 0 0 2px var(--miuix-blue-glow) !important;
}
.DanmakuTail-checkbox-label {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
font-size: var(--dx-font-12) !important;
font-weight: 600 !important;
color: var(--dx-text-title) !important;
cursor: pointer !important;
border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
padding-top: 8px !important;
}
.ChatToolBar-DanmakuTail-Panel.miuix-modal-in {
animation: miuix-modal-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
.DanmakuTail-header {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
margin-bottom: 8px !important;
}
.DanmakuTail-title {
font-size: var(--dx-font-14) !important;
font-weight: 700 !important;
color: var(--dx-text-title) !important;
letter-spacing: -0.2px !important;
}
.DanmakuTail-close {
font-size: var(--dx-font-16) !important;
line-height: 1 !important;
color: var(--dx-text-body) !important;
cursor: pointer !important;
width: 20px !important;
height: 20px !important;
border-radius: var(--dx-radius-6) !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
transition: all 0.16s ease !important;
}
.DanmakuTail-close:hover {
background: rgba(0, 0, 0, 0.08) !important;
color: var(--dx-text-title) !important;
}
/* ==========================================================================
13. PostbirdAlertBox 通用提示/确认/输入弹框 (MIUIX 统一居中模态设计系统)
========================================================================== */
.postbird-box-container {
width: 100vw !important;
height: 100vh !important;
position: fixed !important;
top: 0 !important;
left: 0 !important;
z-index: 100060 !important;
background: rgba(15, 23, 42, 0.42) !important;
backdrop-filter: blur(8px) !important;
-webkit-backdrop-filter: blur(8px) !important;
display: none;
align-items: center !important;
justify-content: center !important;
user-select: none !important;
}
.postbird-box-container.active {
display: flex !important;
}
.postbird-box-dialog {
display: flex !important;
align-items: center !important;
justify-content: center !important;
width: 100% !important;
height: 100% !important;
}
.postbird-box-content {
min-width: 360px !important;
max-width: 440px !important;
border-radius: var(--dx-radius-22) !important;
background: rgba(255, 255, 255, 0.78) !important;
backdrop-filter: blur(40px) saturate(220%) !important;
-webkit-backdrop-filter: blur(40px) saturate(220%) !important;
border: 1px solid rgba(255, 255, 255, 0.95) !important;
box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.98), 0 20px 50px rgba(15, 23, 42, 0.2) !important;
overflow: hidden !important;
position: relative !important;
display: flex !important;
flex-direction: column !important;
animation: miuix-modal-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
margin: 0 !important;
top: 0 !important;
left: 0 !important;
transform: none !important;
}
.postbird-box-header {
width: 100% !important;
padding: 12px 16px !important;
box-sizing: border-box !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
background: rgba(255, 255, 255, 0.45) !important;
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
}
.postbird-box-title {
font-size: var(--dx-font-14) !important;
font-weight: 700 !important;
color: var(--dx-text-title) !important;
letter-spacing: -0.2px !important;
}
.postbird-box-close-btn {
cursor: pointer !important;
font-size: var(--dx-font-16) !important;
line-height: 1 !important;
color: var(--dx-text-body) !important;
width: 24px !important;
height: 24px !important;
border-radius: var(--dx-radius-6) !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
transition: all 0.16s ease !important;
}
.postbird-box-close-btn:hover {
background: rgba(0, 0, 0, 0.08) !important;
color: var(--dx-text-title) !important;
}
.postbird-box-text {
padding: 16px 20px !important;
font-size: var(--dx-font-14) !important;
color: #334155 !important;
line-height: 1.5 !important;
text-align: left !important;
box-sizing: border-box !important;
}
.postbird-prompt-input {
width: 100% !important;
height: 36px !important;
border-radius: var(--dx-radius-8) !important;
border: 1px solid rgba(0, 0, 0, 0.14) !important;
background: rgba(255, 255, 255, 0.9) !important;
padding: 6px 10px !important;
font-size: var(--dx-font-12) !important;
color: var(--dx-text-title) !important;
outline: none !important;
box-sizing: border-box !important;
margin-top: 8px !important;
transition: all 0.18s ease !important;
}
.postbird-prompt-input:focus {
border-color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
box-shadow: 0 0 0 2px var(--miuix-blue-glow) !important;
}
.postbird-box-footer {
width: 100% !important;
height: 46px !important;
border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
background: rgba(255, 255, 255, 0.45) !important;
display: flex !important;
align-items: center !important;
justify-content: flex-end !important;
gap: 8px !important;
padding: 0 16px !important;
box-sizing: border-box !important;
position: relative !important;
}
.postbird-box-footer .btn-footer {
height: 32px !important;
border-radius: var(--dx-radius-8) !important;
padding: 0 14px !important;
font-size: var(--dx-font-12) !important;
font-weight: 600 !important;
cursor: pointer !important;
border: none !important;
outline: none !important;
transition: all 0.16s ease !important;
}
.postbird-box-footer .btn-footer-ok {
background: linear-gradient(135deg, #2b7fff, #0055ff) !important;
color: #ffffff !important;
box-shadow: 0 2px 6px var(--miuix-blue-glow) !important;
}
.postbird-box-footer .btn-footer-ok:hover {
background: linear-gradient(135deg, #3d8bff, #004de6) !important;
transform: translateY(-1px) !important;
}
.postbird-box-footer .btn-footer-cancel {
background: rgba(0, 0, 0, 0.05) !important;
color: #475569 !important;
}
.postbird-box-footer .btn-footer-cancel:hover {
background: rgba(0, 0, 0, 0.1) !important;
color: var(--dx-text-title) !important;
}
/* ==========================================================================
14. 版本更新控制台多态操作按钮状态微交互
========================================================================== */
.exupdate-state-btn--ack,
.exupdate-state-btn--check {
background: linear-gradient(135deg, #1d5fd1, #0047b3) !important; /* S4:白字 5.9–7.6 */
color: #ffffff !important;
box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35) !important;
}
.exupdate-state-btn--ack:hover,
.exupdate-state-btn--check:hover {
background: linear-gradient(135deg, #174fb0, #003d99) !important;
box-shadow: 0 6px 18px rgba(0, 102, 255, 0.45) !important;
transform: translateY(-1px) !important;
}
.exupdate-state-btn--checking {
background: #475569 !important; /* S4:白字 5.6 */
color: #ffffff !important;
box-shadow: none !important;
cursor: wait !important;
}
.exupdate-state-btn--latest {
background: linear-gradient(135deg, #0b7a57, #047857) !important; /* S4:白字 ≥4.6 */
color: #ffffff !important;
box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}
.exupdate-state-btn--latest:hover {
background: linear-gradient(135deg, #06654a, #065f46) !important;
transform: translateY(-1px) !important;
}
.exupdate-state-btn--upgrade {
background: linear-gradient(135deg, #a14a08, #92400e) !important; /* S4:白字 ≥5.3 */
color: #ffffff !important;
box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4) !important;
}
.exupdate-state-btn--upgrade:hover {
background: linear-gradient(135deg, #92400e, #7c2d12) !important;
transform: translateY(-1px) !important;
}
.exupdate-state-btn--error {
background: linear-gradient(135deg, #b91c1c, #991b1b) !important; /* S4:白字 ≥4.5 */
color: #ffffff !important;
box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important;
}
.exupdate-state-btn--error:hover {
background: linear-gradient(135deg, #991b1b, #7f1d1d) !important;
transform: translateY(-1px) !important;
}
/* ==========================================================================
15. 面板专有控件(原 ExpandTool.css / BarrageLoopStyle.css 独有声明上收)
========================================================================== */
.extool input[type="text"]:focus,
.extool input[type="number"]:focus {
border-color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
box-shadow: 0 0 0 2px var(--miuix-blue-glow) !important;
}
.bloop__preset_row {
display: flex !important;
align-items: center !important;
gap: 8px !important;
margin-bottom: 8px !important;
}
.bloop__preset_row select#bloop__select {
flex: 1 1 auto !important;
height: 28px !important;
border-radius: var(--dx-radius-8) !important;
border: 1px solid rgba(0, 0, 0, 0.12) !important;
/* 用 background-color 而非 background 简写,避免重置统一引擎自绘的下拉箭头 */
background-color: rgba(255, 255, 255, 0.85) !important;
font-size: var(--dx-font-12) !important;
color: var(--dx-text-title) !important;
outline: none !important;
padding: 0 8px !important;
}
.bloop__preset_row input[type="button"]#bloop__save {
flex-shrink: 0 !important;
height: 28px !important;
padding: 0 10px !important;
font-size: var(--dx-font-115) !important;
font-weight: 600 !important;
color: var(--dx-accent-deep) !important;
background: rgba(255, 255, 255, 0.92) !important;
border: 1px solid rgba(15, 23, 42, 0.14) !important;
border-radius: var(--dx-radius-6) !important;
cursor: pointer !important;
box-shadow: 0 2px 6px rgba(0, 102, 255, 0.28) !important;
transition: all 0.16s ease !important;
}.bloop__preset_row input[type="button"]#bloop__save:hover {
background: #ffffff !important;
transform: none !important;
background-image: none !important;
border-color: rgba(0, 71, 179, 0.35) !important;
}.bloop__preset_row input[type="button"]#bloop__delete {
flex-shrink: 0 !important;
height: 28px !important;
padding: 0 10px !important;
font-size: var(--dx-font-115) !important;
font-weight: 600 !important;
color: var(--dx-state-danger) !important;
background: rgba(255, 255, 255, 0.92) !important;
border: 1px solid rgba(185, 28, 28, 0.28) !important;
border-radius: var(--dx-radius-8) !important;
cursor: pointer !important;
transition: all 0.16s ease !important;
background-image: none !important;
box-shadow: none !important;
}
.bloop__preset_row input[type="button"]#bloop__delete:hover {
background: #ef4444 !important;
color: #ffffff !important;
transform: translateY(-1px) !important;
}
.bloop textarea#bloop__textarea {
width: 100% !important;
height: 72px !important;
box-sizing: border-box !important;
border-radius: var(--dx-radius-8) !important;
border: 1px solid rgba(0, 0, 0, 0.12) !important;
background: rgba(255, 255, 255, 0.75) !important;
padding: 6px 8px !important;
font-size: var(--dx-font-12) !important;
color: var(--dx-text-title) !important;
line-height: 1.4 !important;
outline: none !important;
resize: none !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
transition: all 0.18s ease !important;
}
.bloop textarea#bloop__textarea:focus {
border-color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
background: rgba(255, 255, 255, 0.95) !important;
box-shadow: 0 0 0 2px var(--miuix-blue-glow) !important;
}
.bloop textarea#bloop__textarea:disabled {
background: rgba(0, 0, 0, 0.05) !important;
color: var(--dx-text-body) !important;
cursor: not-allowed !important;
}
.bloop__param_grid {
display: grid !important;
grid-template-columns: 1fr 1fr !important;
gap: 8px 12px !important;
}.bloop__param_item {
display: flex !important;
align-items: center !important;
gap: 6px !important;
font-size: var(--dx-font-115) !important;
color: #334155 !important;
flex-wrap: nowrap !important;
row-gap: var(--dx-space-2);
}
/* ==========================================================================
16. 全站抽奖信息房间卡片(原 Lottery.css 独有声明上收)
========================================================================== */
.lottery__item {
display: flex !important;
padding: 8px 6px !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
color: var(--dx-text-title) !important;
align-items: center !important;
gap: 8px !important;
text-decoration: none !important;
transition: all 0.16s ease !important;
}
.lottery__a {
text-decoration: none !important;
display: block !important;
}
.lottery__a:hover .lottery__item {
background: rgba(255, 255, 255, 0.7) !important;
border-radius: var(--dx-radius-8) !important;
transform: translateY(-1px) !important;
}
.lottery__img {
position: relative !important;
width: 90px !important;
height: 54px !important;
flex-shrink: 0 !important;
}
.lottery__img img {
width: 90px !important;
height: 54px !important;
object-fit: cover !important;
border-radius: var(--dx-radius-6) !important;
display: block !important;
}
.lottery__anchor {
position: absolute !important;
top: 2px !important;
left: 2px !important;
background: rgba(0, 0, 0, 0.55) !important;
color: #fff !important;
font-size: var(--dx-font-11) !important;
padding: 1px 4px !important;
border-radius: var(--dx-radius-6) !important;
max-width: 80px !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: nowrap !important;
}
.lottery__expireTime {
position: absolute !important;
bottom: 2px !important;
right: 2px !important;
background: rgba(0, 0, 0, 0.55) !important;
color: #fff !important;
font-size: var(--dx-font-11) !important;
padding: 1px 4px !important;
border-radius: var(--dx-radius-6) !important;
}
.lottery__info {
display: flex !important;
flex-direction: column !important;
gap: 2px !important;
overflow: hidden !important;
flex: 1 1 auto !important;
}
.lottery__prize {
font-size: var(--dx-font-12) !important;
font-weight: 700 !important;
color: var(--dx-text-title) !important;
white-space: nowrap !important;
text-overflow: ellipsis !important;
overflow: hidden !important;
}
.lottery__jointext {
font-size: var(--dx-font-11) !important;
color: var(--dx-text-body) !important;
white-space: nowrap !important;
text-overflow: ellipsis !important;
overflow: hidden !important;
}
.lottery__condition {
font-size: var(--dx-font-115) !important;
font-weight: 600 !important;
}
/* ==========================================================================
17. 下拉框与数字输入框的原生外观抹除(MIUIX 自绘控件)
浏览器不允许自定义 select 展开后的选项列表,此处仅统一「收起态」外观:
appearance:none 抹掉系统边框/箭头,改用内联 SVG 自绘澎湃箭头 + 磨砂底 + 聚焦环。
========================================================================== */
.miuix-modal select,
.sign-panel select,
.fans-continue-panel select,
.extool select,
.livetool select,
.bloop select,
.popup-player-panel select,
.exlottery select,
.exupdate-panel select {
-webkit-appearance: none !important;
appearance: none !important;
padding-right: 22px !important;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
background-repeat: no-repeat !important;
background-position: right 7px center !important;
background-size: 10px 6px !important;
cursor: pointer !important;
text-overflow: ellipsis !important;
}
.miuix-modal select:hover,
.sign-panel select:hover,
.fans-continue-panel select:hover,
.extool select:hover,
.livetool select:hover,
.bloop select:hover {
border-color: rgba(0, 102, 255, 0.35) !important;
}
.miuix-modal select:focus,
.sign-panel select:focus,
.fans-continue-panel select:focus,
.extool select:focus,
.livetool select:focus,
.bloop select:focus,
.popup-player-panel select:focus,
.exlottery select:focus,
.exupdate-panel select:focus {
border-color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
box-shadow: 0 0 0 2px var(--miuix-blue-glow) !important;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230066ff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
/* 数字输入的上下微调箭头:磨砂面板里露出系统控件会破坏质感,统一抹除 */
.miuix-modal input[type="number"]::-webkit-outer-spin-button,
.miuix-modal input[type="number"]::-webkit-inner-spin-button,
.extool input[type="number"]::-webkit-outer-spin-button,
.extool input[type="number"]::-webkit-inner-spin-button,
.livetool input[type="number"]::-webkit-outer-spin-button,
.livetool input[type="number"]::-webkit-inner-spin-button,
.fans-continue-panel input[type="number"]::-webkit-outer-spin-button,
.fans-continue-panel input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none !important;
appearance: none !important;
margin: 0 !important;
}
.miuix-modal input[type="number"],
.extool input[type="number"],
.livetool input[type="number"],
.fans-continue-panel input[type="number"] {
-moz-appearance: textfield !important;
text-align: center !important;
}
/* ==========================================================================
18. 主播配置信息悬浮卡(原 MetaData.css 独有声明上收 + MIUIX 重制)
原实现为 2020 年的死白样式(1px #e5e5e5 边框 / 纯白底 / 硬编码 left:199px),
此处换装为与全站一致的磨砂玻璃卡,并补上三种状态的提示样式。
========================================================================== */
#ex-metadata {
position: relative !important;
cursor: pointer !important;
}
#ex-metadata > .metadata__wrap {
display: none;
}
#ex-metadata:hover > .metadata__wrap {
display: block !important;
}
.metadata__wrap {
position: absolute !important;
left: 100% !important;
top: 0 !important;
margin: 0 0 0 6px !important;
padding: 8px 10px !important;
min-width: 132px !important;
max-width: 240px !important;
box-sizing: border-box !important;
list-style: none !important;
border-radius: var(--dx-radius-14) !important;
background: rgba(255, 255, 255, 0.78) !important;
backdrop-filter: blur(28px) saturate(200%) !important;
-webkit-backdrop-filter: blur(28px) saturate(200%) !important;
border: 1px solid rgba(255, 255, 255, 0.95) !important;
box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.95), 0 12px 30px rgba(15, 23, 42, 0.18) !important;
z-index: 100010 !important;
color: var(--dx-text-title) !important;
font-size: var(--dx-font-115) !important;
line-height: 1.45 !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif !important;
white-space: normal !important;
word-break: break-all !important;
user-select: none !important;
}
.metadata__wrap > li {
padding: 3px 0 !important;
color: var(--dx-text-title) !important;
}
.metadata__wrap > li + li {
border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}
/* 「探测失败 重试」提示中的动作文字 */
.metadata__retry {
font-style: normal !important;
margin-left: 4px !important;
font-weight: 600 !important;
color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
}
/* ==========================================================================
20. 多屏(1:1 复刻斗鱼原生「多屏」)
格子区不是模态:它直接改造页面自带的 #js-player-multiContainer 与 5 个槽位
(槽 0 就是斗鱼原生播放器本体),所以本节样式全部以 .layout-Player-multiPlayer /
.layout-Player-videoEntity 为落点,用 ms- 前缀区分自有节点。
几何(top/left/width/height 百分比与 z 序)由引擎写内联样式,因为原生靠
.is-multiN 后代规则驱动,宿主样式表缺失时会整块失灵;内联更稳且取值与原生完全一致。
本节只负责"格子里面长什么样":房名胶囊、加载层、四态文案、拖拽落点与占位块。
注意:本节禁止写死模态宽高(产物级断言认定模态尺寸只能声明一次),
也禁止出现反引号与美元花括号插值(CSS 会被塞进模板字符串,插值起始符会直接截断它)。
========================================================================== */
/* 槽位内视频:撑满并保持比例(原生只给 canvas/video 打了 100% 尺寸) */
.layout-Player-multiContainer .layout-Player-multiPlayer > video.ms-slot__video {
width: 100% !important;
height: 100% !important;
object-fit: contain !important;
display: block !important;
background: #000 !important;
}
/* 换档过渡层:新流先叠在旧画面之上(透明)起播,出画面后再淡入、随后旧画面被移除。
于是换清晰度看到的是"画面轻轻跳一下",而不是黑屏 + 转圈。 */
.layout-Player-multiContainer .layout-Player-multiPlayer > video.ms-slot__video--next {
position: absolute !important;
top: 0 !important;
left: 0 !important;
opacity: 0 !important;
z-index: 2 !important;
transition: opacity 0.25s ease !important;
}
.layout-Player-multiContainer .layout-Player-multiPlayer > video.ms-slot__video--next.is-live {
opacity: 1 !important;
}
/* 房名胶囊:类名与取值 1:1 对齐原生 .nameAndIcon / .nameIcon / .nameTxt */
.layout-Player-multiContainer .ms-slot__name {
position: absolute !important;
left: 10px !important;
bottom: 20px !important;
z-index: 2 !important;
display: flex !important;
align-items: center !important;
max-width: calc(100% - 20px) !important;
padding: 2px !important;
background: rgba(0, 0, 0, 0.6) !important;
border-radius: var(--dx-radius-14) !important;
font-size: var(--dx-font-14) !important;
color: #fff !important;
cursor: pointer !important;
}
.layout-Player-multiContainer .ms-slot__name-icon {
flex: 0 0 auto !important;
width: 20px !important;
height: 20px !important;
border-radius: var(--dx-radius-22) !important;
background-repeat: no-repeat !important;
background-size: cover !important;
background-position: center !important;
background-color: #444 !important;
}
.layout-Player-multiContainer .ms-slot__name-text {
margin: 0 4px !important;
max-width: 120px !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
/* 加载层:原生 .loadingView 是 #333 满铺 + 居中 flex */
.layout-Player-multiContainer .ms-slot__loading {
position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
height: 100% !important;
z-index: 3 !important;
display: none !important;
align-items: center !important;
justify-content: center !important;
background: #333 !important;
}
.layout-Player-multiContainer .ms-slot--loading > .ms-slot__loading,
.layout-Player-multiContainer .ms-slot--notice > .ms-slot__loading {
display: flex !important;
}
/* 文案态:不整块盖住画面,只压一层暗底,让已经出画/黑屏的格子都还能看清 */
.layout-Player-multiContainer .ms-slot--notice > .ms-slot__loading {
background: rgba(0, 0, 0, 0.55) !important;
}
.layout-Player-multiContainer .ms-slot__loading-inner {
width: 100% !important;
text-align: center !important;
}
/* 转圈:原生用 220x128 雪碧图 steps(19);该图是构建期哈希资源无法稳定引用,
这里用同占位的纯 CSS 环代替,时长同为 1.5s,文案与层级完全一致 */
.layout-Player-multiContainer .ms-slot__spin {
width: 34px !important;
height: 34px !important;
margin: 0 auto 18px !important;
border: 3px solid rgba(255, 255, 255, 0.16) !important;
border-top-color: #fff !important;
border-radius: 50% !important;
animation: ms-slot-spin 1.5s linear infinite !important;
}
.layout-Player-multiContainer .ms-slot--notice .ms-slot__spin {
display: none !important;
}
@keyframes ms-slot-spin {
to { transform: rotate(360deg); }
}
.layout-Player-multiContainer .ms-slot__tip {
margin: auto !important;
color: #ccc !important;
font-size: var(--dx-font-14) !important;
text-align: center !important;
}
/* 「重新加载」:原生 .reload 的 86x34 / 2px 橙边 / hover 反色,3 秒后才出现 */
.layout-Player-multiContainer .ms-slot__reload {
display: none !important;
width: 86px !important;
height: 34px !important;
margin: 20px auto 0 !important;
line-height: 34px !important;
font-size: var(--dx-font-14) !important;
color: #ff5d23 !important;
background: transparent !important;
border: 2px solid #ff5d23 !important;
border-radius: var(--dx-radius-8) !important;
cursor: pointer !important;
user-select: none !important;
transition: none !important;
}
.layout-Player-multiContainer .ms-slot__reload.is-visible {
display: block !important;
}
.layout-Player-multiContainer .ms-slot__reload:hover {
background: #ff5d23 !important;
color: #fff !important;
}
/* 拖拽落点高亮:原生只挂 is-cur 而样式表只定义了 .cur(全站 372 份样式表 0 命中),
即原生高亮是失效的。这里两个类都接,并加内发光,小格子上也能一眼看清落点。 */
.layout-Player-multiContainer .layout-Player-multiPlayer.cur,
.layout-Player-multiContainer .layout-Player-multiPlayer.is-cur {
border: 2px solid #ff5d23 !important;
box-shadow: inset 0 0 0 1px rgba(255, 93, 35, 0.45), 0 0 12px rgba(255, 93, 35, 0.35) !important;
}
/* 占位块:被拖起后留在原位的空框(原生 #333 + 2px 白边 + pointer-events:none)。
它刻意不带 is-multiN 类,所以必须自己把基础态的 scale(0) 与 hidden 放开。 */
.layout-Player-multiContainer .layout-Player-multiPlayer.ms-slot--placeholder {
background: #333 !important;
border: 2px solid #fff !important;
box-sizing: border-box !important;
pointer-events: none !important;
transform: scale(1) !important;
visibility: visible !important;
}
/* 被拖起的那一格:原生 .dragging-player 已给到 416x234 + translate(-50%,-50%),
这里只补层级与光标,避免拖到控制条附近时被压住 */
.layout-Player-multiContainer .dragging-player.ms-slot--dragging {
z-index: 99 !important;
cursor: grabbing !important;
}
/* ==========================================================================
22. 同屏播放面板的「多屏观看」页
面板本体是浅色玻璃(--miuix-modal-bg 为白),所以这一节全部走浅色口径;
格子区压在视频上,用深色口径。两套不混用。
========================================================================== */
.popup-panel__page[hidden] {
display: none !important;
}
/* 同屏里的房间数量:跟在标题后面的小胶囊 */
.popup-ms__count {
margin-left: 6px !important;
padding: 1px 6px !important;
font-style: normal !important;
font-size: var(--dx-font-12) !important;
font-weight: 700 !important;
color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
background: rgba(0, 102, 255, 0.1) !important;
border-radius: var(--dx-radius-6) !important;
}
/* 页面整体可滚:房间多时不会把内容顶出面板;纵向 flex 让底部操作区能粘住 */
.popup-panel__page {
display: flex !important;
flex-direction: column !important;
gap: 12px !important;
overflow-y: auto !important;
overflow-x: hidden !important;
}
/* 面板内容高于面板时,让页面自己滚(否则底部会被裁掉:实测 5 间房时内容 437px > 面板高度) */
.popup-player-panel .miuix-modal__body {
display: flex !important;
flex-direction: column !important;
min-height: 0 !important;
}.popup-player-panel .popup-panel__page {
flex: 1 1 auto;
min-height: 0;
}
/* 与第 4 节的全局滚动条同一口径(4px / rgba(0,0,0,0.18) / 4px 圆角) */
.popup-panel__page::-webkit-scrollbar,
.popup-ms__rooms::-webkit-scrollbar,
.popup-ms__results::-webkit-scrollbar {
width: 4px !important;
}
.popup-panel__page::-webkit-scrollbar-thumb,
.popup-ms__rooms::-webkit-scrollbar-thumb,
.popup-ms__results::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.18) !important;
border-radius: var(--dx-radius-6) !important;
}
/* 已加入多屏的列表自己滚,页面其余部分保持不动(外房两行 ≈ 58px/个,五房时滚动看全) */
.popup-ms__rooms {
max-height: 168px !important;
overflow-y: auto !important;
padding-right: 2px !important;
}
/* 「上次配置 · 一键恢复」一行 */
.popup-ms__restore {
display: flex !important;
align-items: center !important;
gap: 8px !important;
margin: 6px 0 2px !important;
}
.popup-ms__restore .popup-panel__paste-btn {
flex: 0 0 auto !important;
white-space: nowrap !important;
}
/* hidden 必须真的收起:上面的 display:flex !important 会压过 UA 样式表的 [hidden],
没有上次配置时那一行仍会白占 8px 版面(对照 .popup-panel__page[hidden] 的写法) */
.popup-ms__restore[hidden] {
display: none !important;
}
.popup-ms__restore-text {
flex: 1 1 auto !important;
min-width: 0 !important;
font-size: var(--dx-font-11) !important;
color: rgba(15, 23, 42, 0.6) !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: nowrap !important;
}
.popup-ms__rooms,
.popup-ms__results {
display: flex !important;
flex-direction: column !important;
gap: 6px !important;
}
.popup-ms__results {
max-height: 132px !important;
overflow-y: auto !important;
overscroll-behavior: contain !important;
}
/* 已加入的每一行。外房是两行:第一行房名/房号/移除,第二行是"怎么合进来"
(合弹幕 · 合画面 · 档位角标 · 音量);主房间只有第一行(它没有"合入"一说)。
单行时 5px+20px+5px = 30px,与改造前完全等高。 */
.popup-ms__room {
display: flex !important;
flex-direction: column !important;
justify-content: center !important;
gap: 4px !important;
min-height: 30px !important;
padding: 5px 8px !important;
box-sizing: border-box !important;
background: var(--miuix-item-bg) !important;
border: var(--miuix-item-border) !important;
border-radius: var(--dx-radius-8) !important;
}
.popup-ms__room-main {
display: flex !important;
align-items: center !important;
gap: 8px !important;
min-height: 20px !important;
}
.popup-ms__room-sub {
display: flex !important;
align-items: center !important;
gap: 6px !important;
}
.popup-ms__room-grow {
flex: 1 1 auto !important;
}
/* 每房间的「合入」胶囊(弹幕 / 画面):按下 = 亮蓝 + 实心圆点,弹起 = 灰 + 淡圆点 */
.popup-ms__chip {
flex: 0 0 auto !important;
height: 20px !important;
padding: 0 8px !important;
font-size: var(--dx-font-11) !important;
line-height: 18px !important;
color: rgba(15, 23, 42, 0.55) !important;
background: rgba(15, 23, 42, 0.04) !important;
border: 1px solid rgba(15, 23, 42, 0.12) !important;
border-radius: var(--dx-radius-10) !important;
cursor: pointer !important;
white-space: nowrap !important;
transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s var(--miuix-spring) !important;
}
.popup-ms__chip::before {
content: "" !important;
display: inline-block !important;
width: 5px !important;
height: 5px !important;
margin-right: 4px !important;
vertical-align: 1px !important;
border-radius: 50% !important;
background: currentColor !important;
opacity: 0.4 !important;
}
.popup-ms__chip[aria-pressed="true"] {
color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
background: rgba(0, 102, 255, 0.1) !important;
border-color: rgba(0, 102, 255, 0.35) !important;
}
.popup-ms__chip[aria-pressed="true"]::before {
opacity: 1 !important;
}
.popup-ms__chip:hover {
color: var(--dx-text-title) !important;
border-color: rgba(15, 23, 42, 0.24) !important;
}
.popup-ms__chip[aria-pressed="true"]:hover {
color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
}
.popup-ms__chip:active {
transform: scale(0.94) !important;
}
/* 这个房间此刻用的档位(自动档显示的是"选出来的那一档",缩窗口会跟着变) */
.popup-ms__room-qn {
flex: 0 0 auto !important;
padding: 1px 6px !important;
font-size: var(--dx-font-11) !important;
color: var(--dx-accent-deep) !important; /* S4:深蓝墨(玻璃上 ≈5.9:1),亮蓝不再当文字 */
background: rgba(0, 102, 255, 0.08) !important;
border-radius: var(--dx-radius-6) !important;
white-space: nowrap !important;
}
/* 外房清晰度:与编辑条顶栏那颗胶囊同一处状态,放这里是"不用先开编辑条也能看见、能改" */
.popup-ms__qrow {
display: flex !important;
align-items: center !important;
gap: 8px !important;
margin-top: 8px !important;
}
.popup-ms__qlabel {
flex: 0 0 auto !important;
font-size: var(--dx-font-11) !important;
color: rgba(15, 23, 42, 0.6) !important;
white-space: nowrap !important;
}
.popup-ms__quality.miuix-seg {
flex: 1 1 auto !important;
margin: 0 !important;
}
.popup-ms__quality .miuix-seg__label {
padding: 4px 4px !important;
font-size: var(--dx-font-11) !important;
}
.popup-ms__room-name {
flex: 1 1 auto !important;
min-width: 0 !important;
font-size: var(--dx-font-12) !important;
color: var(--dx-text-title) !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: nowrap !important;
}
.popup-ms__room-rid {
flex: 0 0 auto !important;
font-size: var(--dx-font-11) !important;
color: rgba(15, 23, 42, 0.55) !important;
}
.popup-ms__room-del {
flex: 0 0 auto !important;
width: 20px !important;
height: 20px !important;
padding: 0 !important;
font-size: var(--dx-font-14) !important;
line-height: 1 !important;
color: rgba(15, 23, 42, 0.5) !important;
background: transparent !important;
border: none !important;
border-radius: 50% !important;
cursor: pointer !important;
transition: all 0.18s var(--miuix-spring) !important;
}
.popup-ms__room-del:hover {
color: #fff !important;
background: #ff5d23 !important;
}
/* 每房间音量:细轨 + 圆形滑块(MIUIX),已填充部分用 --vol 变量着色 */
.popup-ms__room-vol {
flex: 0 0 auto !important;
width: 62px !important;
height: 16px !important;
margin: 0 !important;
padding: 0 !important;
background: transparent !important;
-webkit-appearance: none !important;
appearance: none !important;
cursor: pointer !important;
outline: none !important;
}
.popup-ms__room-vol::-webkit-slider-runnable-track {
height: 4px !important;
border-radius: 2px !important;
background: linear-gradient(to right, var(--miuix-blue) var(--vol, 0%), rgba(15, 23, 42, 0.16) var(--vol, 0%)) !important;
}
.popup-ms__room-vol::-webkit-slider-thumb {
-webkit-appearance: none !important;
appearance: none !important;
width: 12px !important;
height: 12px !important;
margin-top: -4px !important;
border-radius: 50% !important;
background: #ffffff !important;
border: 1px solid rgba(15, 23, 42, 0.18) !important;
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24) !important;
transition: transform 0.16s var(--miuix-spring) !important;
}
.popup-ms__room-vol:hover::-webkit-slider-thumb,
.popup-ms__room-vol:active::-webkit-slider-thumb {
transform: scale(1.15) !important;
}
.popup-ms__room-volnum {
flex: 0 0 auto !important;
width: 24px !important;
font-size: var(--dx-font-11) !important;
text-align: right !important;
color: rgba(15, 23, 42, 0.55) !important;
font-variant-numeric: tabular-nums !important;
}
/* 搜索框撑满卡片宽度:.popup-panel__input-box 原本没有任何样式,input 用的是
浏览器默认宽度(约 169px),卡片右边空一大块。特异性与第 9 节的
.popup-player-panel input[type="text"] 相同,本节在后面,所以这边生效。 */
.popup-panel__input-box {
display: flex !important;
align-items: center !important;
margin-top: 6px !important;
}.popup-panel__input-box input[type="text"] {
width: 100% !important;
height: 28px !important;
padding: 4px 10px !important;
border-radius: var(--dx-radius-8) !important;
background: rgba(255, 255, 255, 0.85) !important;
font-size: var(--dx-font-12) !important;
box-sizing: border-box !important;
flex: 1 1 auto;
min-width: 0;
}
/* 快捷来源按钮并排 */
.popup-ms__src {
display: flex !important;
gap: 8px !important;
margin-top: 8px !important;
}
.popup-ms__src-btn {
flex: 1 1 0 !important;
justify-content: center !important;
}
/* 搜索结果行。行本体是真正的 "}function PopupPlayer_renderQualityRow(){var e=document.getElementById("popup-ms-quality");if(e&&"function"==typeof MultiScreen_getQuality){let t=String(MultiScreen_getQuality());e.innerHTML=MS_QUALITY_LIST.map(function(e){return'"}).join(""),Array.prototype.forEach.call(e.querySelectorAll('input[name="ms_quality_panel"]'),function(e){e.addEventListener("change",function(){e.checked&&MultiScreen_setQuality(e.value)})})}}function PopupPlayer_toggleRoom(e){let t=String(e&&e.rid||"");var n,o=String(MultiScreen_getMainRid()),i=MultiScreen_getList(),a=!!t&&i.some(function(e){return String(e.rid)===t});let r=!1;if(t&&t!==o)if(!a&&e&&2==+e.showStatus){try{document.fullscreenElement&&document.exitFullscreen&&(n=document.exitFullscreen())&&n.catch&&n.catch(function(){})}catch(e){}showMessage("主播还没开播 · 等他上线再加","warning")}else!a&&i.length>=MS_MAX_ROOMS?showMessage("同屏最多 "+MS_MAX_ROOMS+" 个房间 · 先去掉一间再加","warning"):(a?MultiScreen_removeRoom(t):MultiScreen_addRoom(e),r=!0);return r}function PopupPlayer_msRenderResults(o,e){var t=document.getElementById("popup-ms-results");if(t){var n=t.scrollTop;if(!o.length)return t.innerHTML=""===e?"":'
";let i={};MultiScreen_getList().forEach(function(e){i[String(e.rid)]=1}),t.innerHTML=o.map(function(e){var t=String(e.rid),n=i[t],o=n?'':2==+e.showStatus?'':"";return'"}).join(""),t.scrollTop=n,Array.prototype.forEach.call(t.querySelectorAll(".popup-ms__result"),function(n){n.addEventListener("click",function(){let t=n.getAttribute("data-rid");var e=o.filter(function(e){return String(e.rid)===t})[0];e&&PopupPlayer_toggleRoom(e)&&(PopupPlayer_renderMultiPage(),PopupPlayer_msRenderResults(o,""))})})}}function PopupPlayer_msSearch(e){var t,n;return String(null==e?"":e).trim()?(n=(t=String(e).trim()).match(/douyu\.com\/(\d+)/i))?PopupPlayer_msQuickAdd(n[1]):/^\d+$/.test(t)?PopupPlayer_msQuickAdd(t):((n=document.getElementById("popup-ms-results"))&&(n.innerHTML=''),void fetch("https://www.douyu.com/japi/search/api/getSearchRec?kw="+encodeURIComponent(e)+"&type=all",{method:"GET",mode:"no-cors",credentials:"include"}).then(function(e){return e.json()}).then(function(e){e=e&&e.data||e||{};PopupPlayer_msRenderResults((e.roomResult||e.room&&e.room.list||[]).map(function(e){return{rid:String(e.rid||e.room_id||""),nn:e.nickName||e.nickname||e.room_name||"",avatar:e.avatar||e.avatar_small||"",showStatus:void 0===e.isLive?void 0:e.isLive?1:2,sub:e.cateName||"",hot:e.hot||""}}).filter(function(e){return e.rid}),"没找到相关直播间")}).catch(function(){showMessage("没搜成 · 网络有点慢,检查一下网络再点一次「搜索」","error")})):showMessage("请输入房间号、链接或主播名","info")}function PopupPlayer_msQuickAdd(e){let t=String(e);if(t)return t===String(MultiScreen_getMainRid())?showMessage("这就是当前直播间,已经在同屏里了","info"):MultiScreen_getList().some(function(e){return String(e.rid)===t})?showMessage("这间房已经在同屏里了","info"):void(PopupPlayer_toggleRoom({rid:t,nn:"",avatar:"",showStatus:void 0})&&(PopupPlayer_renderMultiPage(),PopupPlayer_msRenderResults([],"")))}function PopupPlayer_msLoadFollow(){if("function"!=typeof getFollowList)return showMessage("读不到关注列表 · 这个功能没装上,刷新页面再试","error"),PopupPlayer_msRenderResults([],"读不到关注列表 · 这个功能没装上,刷新页面再试");PopupPlayer_msRenderResults([],"正在加载关注列表…"),getFollowList().then(function(e){e&&"0"===String(e.error)?PopupPlayer_msRenderResults((e.data&&e.data.list||[]).filter(function(e){return"1"==e.show_status&&"0"==e.videoLoop}).map(function(e){return{rid:String(e.room_id),nn:e.nickname||e.room_name||"",avatar:String(e.avatar_small||"").replace("_big","_small"),showStatus:1,hot:e.online||""}}).slice(0,50),"关注的主播现在都没开播"):(PopupPlayer_msRenderResults([],"读不到关注列表 · 可能还没登录,也可能网络慢;点一次「关注在播」重试"),showMessage("读不到关注列表 · 可能是还没登录,也可能是网络有点慢","error"))}).catch(function(){PopupPlayer_msRenderResults([],"读不到关注列表 · 网络有点慢,稍后再点一次")})}function PopupPlayer_msLoadRecent(){PopupPlayer_msRenderResults(MultiScreen_getRecent(),"还没有同屏观看记录")}let MS_MERGE_COLORS={0:"#ffffff",1:"#ff2e2e",2:"#00ccff",3:"#66ff00",4:"#ff6600",5:"#cc00ff",6:"#f6447f"},MS_MERGE_RATE_WINDOW_MS=1e3,MS_MERGE_RATE_MAX=12,MS_MERGE_RATE_WARN_MS=5e3,MS_MERGE_BADGE_COLOR="rgba(255,255,255,0.22)",MS_BUS_HOLD_MAX=200,MS_BUS_HOLD_TTL_MS=15e3,msMergeSpace=null,msMergeCtors={},msMergeHost=null,msMergeHostVia=null,msMergeInstalled=!1,msMergeConns=[],msMergeRate={hits:[]},msRateWarnAt=0,msMergeStats={pushed:0,dropped:0,noTrack:0,viaBus:0,viaHost:0,held:0,expired:0,pushError:0};function initPkg_PopupPlayer_MergeDanmaku_ScriptHook(){scriptHook({url:"/firstqueue",callback:MergeDanmaku_patchFirstqueue})}function MergeDanmaku_patchFirstqueue(e){var t=/\.prototype\.convertComment\s*=\s*function\s*\(\s*(\w+)\s*\)\s*\{/;return!t.test(e)||-1!==e.indexOf("__ExDanmuHost")?e:e.replace(t,function(e,t){return e+"window.__ExDanmuHost=this;"})}function MergeDanmaku_patchBarrageGroup(e){var t=/(\w+)\.subscribe\(\s*"chatmsg"/;return!t.test(e)||-1!==e.indexOf("__ExChatBus")?e:e.replace(t,function(e,t){return"window.__ExChatBus="+t+";"+e})}let MS_BOOTSTRAP_POLL_MS=1500,MS_BOOTSTRAP_MAX_TRIES=40,msBootTimer=0,msBootTries=0,msBootExpired=!1,msRendererProto=null;function MergeDanmaku_bootstrap(){if(!msMergeSpace||!msMergeCtors.scroll){var o=MergeDanmaku_findDanmakuNodes();if(!o.length)return!1;let t=!!msRendererProto;for(let e=0;e=MS_BOOTSTRAP_MAX_TRIES)&&(n=!0,clearInterval(msBootTimer),msBootTimer=0,e&&!t?console.warn("[DouyuEx] 未能接入播放器自己的弹幕管线(React fiber 上溯失败),其它房间的弹幕暂按自建数据上屏:颜色与来源横条正常,粉丝牌/等级/贵族底不显示。"):e||(msBootExpired=!0,console.warn("[DouyuEx] 多屏弹幕合并自举到期:"+msBootTries+" 次仍未抓到原生弹幕引擎(弹幕层关着或没有飘屏都算),来源横条暂不可用;其它房间的弹幕仍会经 socketProxy.socketStream 合入。下一次其它房间的报文到来时会自动再试一次。ready="+(msMergeSpace&&msMergeCtors.scroll?"true":"false")+" streamVia="+(msBusVia||"null"))))};e(),n||(msBootTimer=setInterval(e,MS_BOOTSTRAP_POLL_MS))}}function MergeDanmaku_retryBootstrap(){!msBootExpired||msMergeSpace&&msMergeCtors.scroll||(msBootTries=0,msBootExpired=!1,MergeDanmaku_startBootstrap())}let MS_HOST_FIBER_MAX_HOPS=120;function MergeDanmaku_walkFiberForHost(e){if(e&&1===e.nodeType){let t=e,n=null,o=null;for(;t&&t!==document.documentElement;){var i=Object.keys(t);for(let e=0;e=e.maxReconnect)return;var t=e.ws;if(!t)return 1;var n=t.readyState;if("number"==typeof n&&(2===n||3===n)&&"number"!=typeof e.reconnectCount)return}catch(e){return}return 1}}function MergeDanmaku_syncConnections(){var e=MultiScreen_getList();let t=MultiScreen_getMainRid();e=e.filter(function(e){return String(e.rid)!==t&&!1!==e.danmaku});let n={},o=(e.forEach(function(e){n[String(e.rid)]=e}),msMergeConns=msMergeConns.filter(function(e){if(n[e.rid]){if(MergeDanmaku_connAlive(e))return!0;try{e.ws&&"function"==typeof e.ws.close&&e.ws.close()}catch(e){}}else try{e.ws&&"function"==typeof e.ws.close?e.ws.close():e.ws&&e.ws.ws&&(e.ws.closed=!0,e.ws.ws.close())}catch(e){}return!1}),msBusHold.length&&(msBusHold=msBusHold.filter(function(e){e=e&&e.item?String(e.item.srcRid):"";return!!e&&!!n[e]})),{});msMergeConns.forEach(function(e){o[e.rid]=1}),e.forEach(function(e){var n=String(e.rid);if(!o[n]&&"function"==typeof Ex_WebSocket_UnLogin){let t=e;e=new Ex_WebSocket_UnLogin(n,function(e){MergeDanmaku_handleMsg(t,e)});msMergeConns.push({rid:n,nn:t.nn||"",ws:e})}})}let msBusCache=null,msBusVia=null;function MergeDanmaku_isSocketData(e){try{return e&&"object"==typeof e&&"function"==typeof e.push&&"function"==typeof e.decoder&&"function"==typeof e.subscribe}catch(e){}}function MergeDanmaku_getStream(){var n="undefined"!=typeof unsafeWindow?unsafeWindow:window,e=n.socketProxy;if(msBusCache){if(e&&e.socketStream===msBusCache&&MergeDanmaku_isSocketData(msBusCache))return msBusCache;msBusCache=null,msBusVia=null}if(e&&MergeDanmaku_isSocketData(e.socketStream))return msBusCache=e.socketStream,msBusVia="socketProxy",msBusCache;let t=[];try{t=Object.getOwnPropertyNames(n)}catch(e){t=[]}for(let e=0;eMS_INJECT_TTL_MS)&&(!i[t]&&n(i)))return i[t]=!0,i}return null}function MergeDanmaku_injectNative(e){var t=MergeDanmaku_getStream();if(!t||!e||!e.packet)return!1;MergeDanmaku_rememberInjected(e);try{return t.push(e.packet),msMergeStats.viaBus++,!0}catch(e){return msInjectQueue.length&&msInjectQueue.pop(),msBusCache=null,msBusVia=null,msMergeStats.pushError++,!1}}let msBusHold=[],msBusHoldTimer=0;function MergeDanmaku_holdForBus(e){msBusHold.push({item:e,at:Date.now()}),msBusHold.length>MS_BUS_HOLD_MAX&&msBusHold.shift(),msMergeStats.held++,msBusHoldTimer=msBusHoldTimer||setInterval(function(){MergeDanmaku_flushBusHold(),msBusHold.length||(clearInterval(msBusHoldTimer),msBusHoldTimer=0)},500)}let MS_BUS_FLUSH_PER_TICK=4;function MergeDanmaku_flushBusHold(){if(msBusHold.length){let n=Date.now();if(MergeDanmaku_getStream()){let e=0;for(;msBusHold.length&&e=MS_BUS_HOLD_TTL_MS?MergeDanmaku_dropHeld(e.item):t.push(e)}),msBusHold=t}}}function MergeDanmaku_dropHeld(e){msMergeStats.expired++,MergeDanmaku_warnNoStream();try{MergeDanmaku_feedViaHost(e)&&msMergeStats.viaHost++}catch(e){}}let msWarnedNoStream=!1;function MergeDanmaku_warnNoStream(){msWarnedNoStream||(msWarnedNoStream=!0,console.warn("[DouyuEx] 一直没等到 socketProxy.socketStream(斗鱼自己的报文入口),这段时间其它房间的弹幕只在飘屏显示、聊天区没有对应条目;等它出现会自动恢复正常。"))}let msChatObserver=null,msChatWatchTimer=0;function MergeDanmaku_startChatWatch(){if(!msChatObserver&&!msChatWatchTimer&&!MergeDanmaku_watchChatList()){let e=0;msChatWatchTimer=setInterval(function(){e++,(MergeDanmaku_watchChatList()||60<=e)&&(clearInterval(msChatWatchTimer),msChatWatchTimer=0)},1e3)}}function MergeDanmaku_watchChatList(){var e;return!!msChatObserver||!!(e=document.getElementById("js-barrage-list"))&&((msChatObserver=new MutationObserver(function(t){for(let e=0;e=MS_MERGE_RATE_WARN_MS&&(msRateWarnAt=e,console.warn("[DouyuEx] 其它房间的弹幕超过 "+MS_MERGE_RATE_MAX+" 条/秒,超出的已丢弃(累计 "+msMergeStats.dropped+" 条);比例与入口状态看 MergeDanmaku_getStats() 的 pushed / viaBus / streamVia。")),1)))}function MergeDanmaku_allowRate(){for(var e=Date.now(),t=msMergeRate.hits;t.length&&e-t[0]>=MS_MERGE_RATE_WINDOW_MS;)t.shift();return!(t.length>=MS_MERGE_RATE_MAX)&&(t.push(e),1)}function MergeDanmaku_feedViaHost(e){var t=MergeDanmaku_getHost();if(!t)return null;var n=e.raw;if(!n)return null;try{var o=t.convertComment(n);if(!o)return!1;o.extraData||(o.extraData={}),o.extraData.exMsSrcRid=String(e.srcRid),o.extraData.exMsSrcName=e.srcName;var i=t.cm.send(o);return i||msMergeStats.noTrack++,!!i}catch(e){return null}}window.MergeDanmaku_getStats=function(){return{pushed:msMergeStats.pushed,dropped:msMergeStats.dropped,noTrack:msMergeStats.noTrack,viaBus:msMergeStats.viaBus,viaHost:msMergeStats.viaHost,held:msBusHold.length,expired:msMergeStats.expired,stream:!!MergeDanmaku_getStream(),streamVia:msBusVia,ready:!(!msMergeSpace||!msMergeCtors.scroll),rendererWrapped:!!msRendererProto,bootTries:msBootTries,bootExpired:msBootExpired,pushError:msMergeStats.pushError,host:!!msMergeHost,hostVia:msMergeHostVia,conns:msMergeConns.map(function(e){return e.rid})}},window.MergeDanmaku_push=MergeDanmaku_push,window.MergeDanmaku_parseChatmsg=MergeDanmaku_parseChatmsg,window.MergeDanmaku_badgeText=MergeDanmaku_badgeText,window.MergeDanmaku_attachBadge=MergeDanmaku_attachBadge,window.MergeDanmaku_bootstrap=MergeDanmaku_bootstrap,window.MergeDanmaku_patchFirstqueue=MergeDanmaku_patchFirstqueue,window.MergeDanmaku_patchBarrageGroup=MergeDanmaku_patchBarrageGroup,window.MergeDanmaku_feedViaHost=MergeDanmaku_feedViaHost,window.MergeDanmaku_getHost=MergeDanmaku_getHost,window.MergeDanmaku_findHostByFiber=MergeDanmaku_findHostByFiber,window.MergeDanmaku_walkFiberForHost=MergeDanmaku_walkFiberForHost,window.MergeDanmaku_getStream=MergeDanmaku_getStream,window.MergeDanmaku_flushBusHold=MergeDanmaku_flushBusHold,window.MergeDanmaku_dropHeld=MergeDanmaku_dropHeld,window.MergeDanmaku_injectNative=MergeDanmaku_injectNative,window.MergeDanmaku_badgeNativeChatItem=MergeDanmaku_badgeNativeChatItem,window.MergeDanmaku_watchChatList=MergeDanmaku_watchChatList;let MS_SLOT_COUNT=5,MS_MAX_ROOMS=5,MS_MIN_ROOMS=2,MS_LONGPRESS_MS=300,MS_SWAP_DELAY_MS=500,MS_RELOAD_BTN_MS=3e3,MS_START_TIMEOUT_MS=8e3,MS_BOTTOM_GUARD_PX=42,MS_STALL_TICK_MS=2e3,MS_STALL_QUIET_MS=6e3,MS_CLICK_SWAP_TO_MAIN=!1,MS_QUALITY_LIST=[{v:"auto",name:"自动",short:"自动"},{v:"0",name:"蓝光4M",short:"蓝光"},{v:"3",name:"超清",short:"超清"},{v:"2",name:"高清",short:"高清"},{v:"1",name:"流畅",short:"流畅"}],MS_QN_BIG_SHARE=.45,MS_QN_AUTO_TIERS=[{minH:280,qn:"0"},{minH:180,qn:"2"},{minH:0,qn:"1"}],MS_LAYOUT={2:[[25,0,50,50],[25,50,50,50]],3:[[17.2,.8,65.6,65.6],[17.2,66.4,32.8,32.8],[50,66.4,32.8,32.8]],4:[[0,0,50,50],[0,50,50,50],[50,50,50,50],[50,0,50,50]],5:[[1.4,9.5,48.6,48.6],[1.4,58.1,32.4,32.4],[33.8,58.1,32.4,32.4],[50,9.5,48.6,48.6],[66.2,58.1,32.4,32.4]]},MS_SLOT_Z=[5,4,3,2,1],msContainer=null,msActiveList=[],msHistoryList=[],msMultiType=0,msSlotPlayers=new Map,msPosOwner=[0,1,2,3,4],msQn="auto",msEpoch=0,msDrag=null,msDragTimer=null,msStallTickMs=MS_STALL_TICK_MS,msStallQuietMs=MS_STALL_QUIET_MS,msStartTimeoutMs=MS_START_TIMEOUT_MS,msOnChangeList=[],msOnSlotClick=null,msMetaCache=new Map;function MultiScreen_notifyChange(t){msOnChangeList.forEach(function(e){try{e(t)}catch(e){}})}function MultiScreen_getContainer(){return msContainer=msContainer&&msContainer.isConnected?msContainer:document.getElementById("js-player-multiContainer")}function MultiScreen_cells(){var t=MultiScreen_getContainer(),n=[];if(t){n[0]=t.querySelector(".layout-Player-videoEntity");for(let e=1;e=i.length?(e.style.top="0px",e.style.left="0px",e.style.width="0px",e.style.height="0px",e.style.zIndex="0",e.style.transform="scale(0)",e.style.visibility="hidden"):(n=i[t],e.style.top=n[0]+"%",e.style.left=n[1]+"%",e.style.width=n[2]+"%",e.style.height=n[3]+"%",e.style.zIndex=String(MS_SLOT_Z[t]),e.style.transform="scale(1)",e.style.visibility="visible"))}),MultiScreen_reapplyAutoQuality(),MultiScreen_notifyChange(msActiveList.slice())}}function MultiScreen_clearSlot(e){var t=msSlotPlayers.get(e),t=(t&&(t.prev&&MultiScreen_destroyPlayer(t.prev),MultiScreen_destroyPlayer(t),msSlotPlayers.delete(e)),MultiScreen_slotDom(e));t&&(0!==msPosOwner[e]&&(t.innerHTML=""),t.classList.remove("ms-slot--loading","ms-slot--notice","ms-slot--novideo","is-cur","cur","dragging-player","ms-slot--dragging"))}function MultiScreen_renderSlotNoVideo(e,n){var t=MultiScreen_slotDom(e);if(t){MultiScreen_clearSlot(e),t.innerHTML='',MultiScreen_fillName(t,n),t.classList.add("ms-slot--novideo","ms-slot--notice");n=t.querySelector(".ms-slot__reload");if(n){let t=msPosOwner[e];n.addEventListener("click",function(e){e.stopPropagation();e=MultiScreen_positionOfCell(t),e=0<=e?msActiveList[e]:null;e&&MultiScreen_setRoomFlag(String(e.rid),"video",!0)})}}}function MultiScreen_renderSlot(t,a){let r=MultiScreen_slotDom(t);if(r&&a&&0!==msPosOwner[t]){if(!1===a.video)return MultiScreen_renderSlotNoVideo(t,a);MultiScreen_clearSlot(t);let n=++msEpoch,o=msPosOwner[t],i=(r.classList.add("ms-slot--loading"),r.innerHTML='',{rid:String(a.rid),epoch:n,flv:null,video:r.querySelector(".ms-slot__video"),reloadTimer:0,startTimer:0,url:"",stallTimer:0,lastTick:0,stalled:0}),e=(i.video&&(i.video.muted=!0,i.video.volume=0,i.video.setAttribute("muted","")),i.vol=MultiScreen_getVolume(i.rid,!1),msSlotPlayers.set(t,i),MultiScreen_fillName(r,a),r.querySelector(".ms-slot__reload"));e&&e.addEventListener("click",function(e){e.stopPropagation();var e=MultiScreen_positionOfCell(o),t=0<=e?msActiveList[e]:null;t&&MultiScreen_renderSlot(e,t)}),i.reloadTimer=setTimeout(function(){e&&0<=MultiScreen_positionOfRecord(i)&&e.classList.add("is-visible")},MS_RELOAD_BTN_MS),MultiScreen_resolveRoom(a,function(e){var t=MultiScreen_positionOfRecord(i);t<0||(MultiScreen_fillName(r,e),2==+e.showStatus?MultiScreen_setTip(r,"主播正在赶来中…"):MultiScreen_fetchStream(t,e,n))})}}function MultiScreen_resolveRoom(t,n){let o=String(t.rid);var e;t.nn?n(t):(e=msMetaCache.get(o))?n(Object.assign({},t,e)):fetch("https://www.douyu.com/betard/"+o,{method:"GET",mode:"no-cors",credentials:"include"}).then(function(e){return e.json()}).then(function(e){e=e&&e.room||{},e={nn:e.nickname||e.room_name||"",avatar:e.avatar&&e.avatar.middle||"",showStatus:void 0===e.show_status?void 0:+e.show_status};msMetaCache.set(o,e),n(Object.assign({},t,e))}).catch(function(){n(t)})}function MultiScreen_getMetaName(e){e=msMetaCache.get(String(e));return e&&e.nn||""}function MultiScreen_fillName(e,t){var n=e.querySelector(".ms-slot__name-text"),e=e.querySelector(".ms-slot__name-icon"),o=t.nn||"房间 "+t.rid;n&&(n.textContent=o,n.title=o),e&&(t.avatar?(e.style.backgroundImage='url("'+t.avatar+'")',e.style.display=""):e.style.display="none")}function MultiScreen_setTip(e,t){var n;e&&((n=e.querySelector(".ms-slot__tip"))&&(n.textContent=t),e.classList.remove("ms-slot--loading"),e.classList.add("ms-slot--notice"),n=e.querySelector(".ms-slot__reload"))&&n.classList.add("is-visible")}function MultiScreen_pickQnForSlot(e){var t=MultiScreen_slotDom(e);let n=0;try{n=t?t.getBoundingClientRect().height:0}catch(e){n=0}let o=0;try{var i=MultiScreen_getContainer();o=i?i.getBoundingClientRect().height:0}catch(e){o=0}if(n||(t=MultiScreen_layoutSlotOf(e),(i=MS_LAYOUT[msMultiType])&&0<=t&&i[t]&&(n=o*(i[t][3]/100))),!n)return"2";if(0=MS_QN_BIG_SHARE)return"0";for(let e=0;e=MS_QN_AUTO_TIERS[e].minH)return MS_QN_AUTO_TIERS[e].qn;return"1"}function MultiScreen_qnFor(e){return"auto"===msQn?MultiScreen_pickQnForSlot(e):msQn}function MultiScreen_getQnReport(){var e=MultiScreen_getContainer();let n=0;try{n=e?e.getBoundingClientRect().height:0}catch(e){n=0}var o=[];for(let e=0;e=MS_MAX_ROOMS)return MultiScreen_after();msActiveList=MultiScreen_normalize(msActiveList.concat([t]))}else msActiveList="delete"===e?(MultiScreen_forgetQnCompare(t),MultiScreen_normalize(msActiveList.filter(function(e){return String(e.rid)!==String(t)}))):MultiScreen_normalize(t);return MultiScreen_renderAll(),MultiScreen_settleSingleScreen(),MultiScreen_applyLayout(),MultiScreen_after()}function MultiScreen_clearPendingWork(){msQnCompare&&(clearTimeout(msQnCompare.timer),msQnCompare=null),clearTimeout(msAutoQnTimer),msAutoQnTimer=0,clearTimeout(msDragTimer),msDragTimer=null,clearTimeout(msHealTimer),msHealTimer=0}function MultiScreen_forgetQnCompare(e){if(msQnCompare){e=String(e);if(e in msQnCompare.prev){delete msQnCompare.prev[e],delete msQnCompare.done[e],delete msQnCompare.same[e];e=Object.keys(msQnCompare.prev).length;if(!e)return clearTimeout(msQnCompare.timer),msQnCompare=null;Object.keys(msQnCompare.done).length>=e&&MultiScreen_finishQnCompare()}}}function MultiScreen_after(){msMultiType=MultiScreen_visiblePositions().length,MultiScreen_save();var t=String(MultiScreen_getMainRid());for(let e=0;e=t&&MultiScreen_finishQnCompare()))}function MultiScreen_qnLabel(t){for(let e=0;eMS_MAX_ROOMS)return-1;o=o.getBoundingClientRect();if(!o.width||!o.height)return-1;if(eo.right||to.bottom)return-1;t-=o.top;if(n&&t>=o.height-MS_BOTTOM_GUARD_PX)return-1;n=(e-o.left)/o.width,e=t/o.height;let a=-1;if(2===i){if(e<.25||.75o.right||no.bottom)&&(e.click(),1):void 0}let MS_RECENT_MAX=20;function MultiScreen_pushRecent(n){if(n&&n.rid){let e=MultiScreen_getRecentRaw(),t=String(n.rid);(e=e.filter(function(e){return String(e.rid)!==t})).unshift({rid:t,nn:n.nn||"",avatar:n.avatar||""}),e.length>MS_RECENT_MAX&&(e=e.slice(0,MS_RECENT_MAX));try{localStorage.setItem("ExSave_MultiScreenRecent",JSON.stringify(e))}catch(e){}}}function MultiScreen_getRecentRaw(){try{var e=localStorage.getItem("ExSave_MultiScreenRecent"),t=e?JSON.parse(e):null;return Array.isArray(t)?t.filter(function(e){return e&&e.rid}):[]}catch(e){return[]}}function MultiScreen_getRecent(){let t={};return msActiveList.forEach(function(e){t[String(e.rid)]=1}),MultiScreen_getRecentRaw().filter(function(e){return!t[String(e.rid)]})}function MultiScreen_save(){try{localStorage.setItem("ExSave_MultiScreen",JSON.stringify({list:msActiveList.map(MultiScreen_roomRecord),qn:msQn}))}catch(e){}MultiScreen_rememberForMainRoom()}let MS_BYROOM_KEY="ExSave_MultiScreenByRoom",msByRoom=null;function MultiScreen_loadByRoom(){if(!msByRoom){msByRoom={};try{var e=JSON.parse(localStorage.getItem(MS_BYROOM_KEY)||"null");e&&"object"==typeof e&&!Array.isArray(e)&&(msByRoom=e)}catch(e){msByRoom={}}}return msByRoom}function MultiScreen_rememberForMainRoom(){var e=MultiScreen_getMainRid();if(e){var t=msActiveList.slice(1).map(MultiScreen_roomRecord);if(t.length){var n=MultiScreen_loadByRoom();n[e]={rooms:t,at:Date.now()};try{localStorage.setItem(MS_BYROOM_KEY,JSON.stringify(n))}catch(e){}}}}function MultiScreen_savedConfigForMainRoom(){var e=MultiScreen_getMainRid(),e=MultiScreen_loadByRoom()[e];return!(e&&Array.isArray(e.rooms)&&e.rooms.length)||msActiveList.slice(1).map(function(e){return String(e.rid)}).join(",")===e.rooms.map(function(e){return String(e.rid)}).join(",")?null:e.rooms.slice(0,MS_MAX_ROOMS-1)}function MultiScreen_load(){try{var e=localStorage.getItem("ExSave_MultiScreen");if(!e)return null;var n=JSON.parse(e),o=MultiScreen_saneQn(n&&n.qn),i=(o&&(msQn=o),n&&Array.isArray(n.list)?n.list:[]);let t=[];return i.forEach(function(e){e=MultiScreen_saneItem(e);e&&t.push(e)}),1=MS_MIN_ROOMS?(MultiScreen_teardownForPlayerSwap(),0):(msContainer=null,1)):++msSwapMissTicks<3||(msSwapMissTicks=0,msActiveList.lengtha")[0];if(null!=t){var n=t.href+"?type=video",t=t.href+"?type=liveReplay";setAvatarVideo_Dom(),setAvatarYuba_Dom(),setAvatarVideo_Func(n,t);let e=document.getElementsByClassName("Title-anchorPic-bottom")[0];e&&(e.style.display="none",e.style.height=hasAvatarBottom?"66px":"22px");n=document.getElementsByClassName("Title-anchorPicBack")[0];n&&e&&(n.addEventListener("mouseenter",()=>{e.style.display="block"}),n.addEventListener("mouseleave",()=>{e.style.display="none"}))}}function setAvatarVideo_Dom(){var e=document.createElement("div"),t=(hasAvatarBottom=!!document.getElementsByClassName("Title-anchorPic-bottom")[0],e.className=hasAvatarBottom?"":"Title-anchorPic-bottom",e.innerHTML=`
回看
投稿
`,document.getElementsByClassName("Title-anchorPic-bottom")[0]||document.getElementsByClassName("Title-anchorPicBack")[0]);t&&t.insertBefore(e,t.childNodes[0])}function setAvatarYuba_Dom(){var e=document.createElement("div"),t=(hasAvatarBottom=!!document.getElementsByClassName("Title-anchorPic-bottom")[0],e.className=hasAvatarBottom?"":"Title-anchorPic-bottom",e.innerHTML=`
打开鱼吧
`,document.getElementsByClassName("Title-anchorPic-bottom")[0]||document.getElementsByClassName("Title-anchorPicBack")[0]);t&&t.insertBefore(e,t.childNodes[0])}function setAvatarVideo_Func(e,t){var n=document.getElementById("Ex_VideoSubmit"),n=(n&&n.addEventListener("click",()=>{openPage(e,!0)}),document.getElementById("Ex_VideoReview")),n=(n&&n.addEventListener("click",()=>{openPage(t,!0)}),document.getElementById("Ex_EnterYuba"));n&&n.addEventListener("click",async()=>{openPage((await getBindYuba(rid)).data.group_url,!0)})}function getBindYuba(e){return new Promise((t,n)=>{fetch("https://www.douyu.com/wgapi/yubanc/api/group/getBindGroup?room_id="+e).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{n(e)})})}function initPkg_Refresh(){Refresh_tryInit("拉高",initPkg_Refresh_BarrageFrame),Refresh_tryInit("隐藏礼物栏",initPkg_Refresh_Video),Refresh_tryInit("前缀",initPkg_Refresh_Barrage)}function Refresh_tryInit(t,e){try{"function"==typeof e&&e()}catch(e){"function"==typeof ExGuard_warn?ExGuard_warn("简洁模式",t+" 初始化失败(其余功能照常)",e):console.error("[DouyuEx] 简洁模式初始化失败:"+t+" —— "+(e&&e.message||e))}}function Refresh_readSave(){if("undefined"==typeof localStorage||!localStorage)return{};let t=null;try{t=localStorage.getItem("ExSave_Refresh")}catch(e){t=null}if(null==t)return{};let e=null;try{e=JSON.parse(t)}catch(e){return"function"==typeof ExGuard_warn&&ExGuard_warn("简洁模式","本地配置已损坏,已按默认值处理",e),{}}return e&&"object"==typeof e?e:{}}function Refresh_readFullScreen(){if("undefined"!=typeof localStorage&&localStorage){let e=null;try{e=localStorage.getItem("ExSave_FullScreen")}catch(e){return}if(null!=e)try{var t=JSON.parse(e);return t&&t.isFullScreen}catch(e){}}}function saveData_Refresh(){var e={barrageFrame:{status:refresh_BarrageFrame_getStatus()},video:{status:refresh_Video_getStatus()},barrage:{status:refresh_Barrage_getStatus()}};localStorage.setItem("ExSave_Refresh",JSON.stringify(e))}let current_barrage_status=0;function initPkg_Refresh_Barrage(){initPkg_Refresh_Barrage_Dom(),initPkg_Refresh_Barrage_Func(),initPkg_Refresh_Barrage_Set()}function initPkg_Refresh_Barrage_Dom(){Refresh_Barrage_insertIcon()}function Refresh_Barrage_insertIcon(){var e=document.createElement("a"),t=(e.className="refresh-barrage",e.id="refresh-barrage",e.innerHTML='前缀',document.getElementsByClassName("Barrage-toolbar")[0]);t&&t.insertBefore(e,t.childNodes[0])}function Refresh_Barrage_applyUI(e){var t=document.getElementById("refresh-barrage"),t=(t&&t.classList[e?"add":"remove"]("ex-active"),document.getElementById("refresh-barrage__text")),t=(t&&(t.style.color=e?"#fff":"",t.innerText=e?"恢复前缀":"前缀"),document.getElementById("refresh-barrage__svg"));t&&(t=t.getElementsByTagName("path")[0])&&t.setAttribute("fill",e?"#ffffff":"#AFAFAF")}function initPkg_Refresh_Barrage_Func(){var e=document.getElementById("refresh-barrage");e?e.addEventListener("click",function(){var e;0==current_barrage_status?(e=function(){setRefreshBarrage(),saveData_Refresh()},void 0===PostbirdAlertBox?("function"==typeof showMessage&&showMessage("【简洁模式】缺少确认弹窗组件,已直接屏蔽弹幕前缀","warning"),e()):PostbirdAlertBox.confirm({title:"提示",content:"是否屏蔽弹幕前缀(如粉丝牌、钻粉、贵族等标志)",okBtn:"确定",cancelBtn:"取消",onConfirm:e,onCancel:function(){}})):(cancelRefreshBarrage(),saveData_Refresh())}):"function"==typeof ExGuard_warn&&ExGuard_warn("简洁模式","「前缀」按钮不存在,本次不绑定")}function refresh_Barrage_getStatus(){return 1==current_barrage_status}function initPkg_Refresh_Barrage_Set(){var e=Refresh_readSave().barrage;e&&1==e.status&&setRefreshBarrage()}function setRefreshBarrage(){StyleHook_set("Ex_Style_RefreshBarrage",`
.UserCsgoGameDataMedal,.Barrage-honor,.Barrage-listItem .Barrage-icon,.Barrage-listItem .FansMedal.is-made,.Barrage-listItem .RoomLevel,.Barrage-listItem .Motor,.Barrage-listItem .ChatAchievement,.Barrage-listItem .Barrage-hiIcon,.Barrage-listItem .Medal,.Barrage-listItem .MatchSystemTeamMedal{display:none !important;}
/*.Barrage-listItem .UserLevel{display:none !important;}*/
.Barrage-listItem .Baby{display:none !important;}
.FansMedalWrap{display:none !important;}
`),current_barrage_status=1,Refresh_Barrage_applyUI(!0)}function cancelRefreshBarrage(){StyleHook_remove("Ex_Style_RefreshBarrage"),current_barrage_status=0,Refresh_Barrage_applyUI(!1)}function initPkg_Refresh_BarrageFrame(){initPkg_Refresh_BarrageFrame_Dom(),initPkg_Refresh_BarrageFrame_Func(),initPkg_Refresh_BarrageFrame_Set()}function initPkg_Refresh_BarrageFrame_Dom(){Refresh_BarrageFrame_insertIcon()}function Refresh_BarrageFrame_insertIcon(){var e=document.createElement("a"),t=(e.className="refresh-barrage",e.id="refresh-barrage-frame",e.innerHTML='拉高',document.getElementsByClassName("Barrage-toolbar")[0]);t&&t.insertBefore(e,t.childNodes[0])}function Refresh_BarrageFrame_applyUI(e){var t=document.getElementById("refresh-barrage-frame"),t=(t&&t.classList[e?"add":"remove"]("ex-active"),document.getElementById("refresh-barrage-frame__text")),t=(t&&(t.style.color=e?"#fff":"",t.innerText=e?"恢复高度":"拉高"),document.getElementById("refresh-barrage-frame__svg"));t&&(t=t.getElementsByTagName("path")[0])&&t.setAttribute("fill",e?"#ffffff":"#AFAFAF")}function Refresh_BarrageFrame_apply(e,t){var n=document.getElementsByClassName("layout-Player-rank")[0],o=document.getElementById("js-room-activity"),i=document.getElementsByClassName("Barrage")[0];if(n&&i)return e?(n.style.display="none",o&&(o.style.display="none"),i.className="Barrage top-0-important"):(n.style.display="block",o&&(o.style.display="block"),i.className="Barrage"),Refresh_BarrageFrame_applyUI(e),1;"function"==typeof ExGuard_warn&&ExGuard_warn("简洁模式","缺少日榜或弹幕区节点,「拉高」本次未执行(场景:"+(t||"未知")+")")}function initPkg_Refresh_BarrageFrame_Func(){var e=document.getElementById("refresh-barrage-frame");e?e.addEventListener("click",function(){var e;refresh_BarrageFrame_getStatus()?Refresh_BarrageFrame_apply(!1,"点击")&&saveData_Refresh():(e=function(){Refresh_BarrageFrame_apply(!0,"点击")&&saveData_Refresh()},void 0===PostbirdAlertBox?("function"==typeof showMessage&&showMessage("【简洁模式】缺少确认弹窗组件,已直接拉高弹幕框","warning"),e()):PostbirdAlertBox.confirm({title:"提示",content:"是否拉高弹幕框,隐藏日榜周榜",okBtn:"确定",cancelBtn:"取消",onConfirm:e,onCancel:function(){}}))}):"function"==typeof ExGuard_warn&&ExGuard_warn("简洁模式","「拉高」按钮不存在,本次不绑定")}function refresh_BarrageFrame_getStatus(){var e=document.getElementsByClassName("layout-Player-rank")[0];return!!e&&"none"==e.style.display}function initPkg_Refresh_BarrageFrame_Set(){var e=Refresh_readSave().barrageFrame;e&&1==e.status&&Refresh_BarrageFrame_apply(!0,"恢复")}let video_num=0;function initPkg_Refresh_Video(){let e=setInterval(()=>{getValidDom([".right-e7ea5d",".right-17e251"])&&(clearInterval(e),initPkg_Refresh_Video_Dom(),initPkg_Refresh_Video_Func(),initPkg_Refresh_Video_Set()),100<=++video_num&&clearInterval(e)},1500)}function initPkg_Refresh_Video_Dom(){Refresh_Video_insertIcon()}function Refresh_Video_insertIcon(){let e=document.createElement("li"),t=(e.id="refresh-video",e.innerText="隐藏礼物栏",document.getElementsByClassName("menu-da2a9e")[0]);t&&t.insertBefore(e,t.childNodes[t.childNodes.length-1]),!document.getElementById("refresh-video3")&&((e=document.createElement("div")).id="refresh-video3",e.title="点击隐藏礼物栏",e.innerHTML=``,e.style="position:absolute;left:18px;bottom:58px;padding:0 10px;height:28px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.55);color:#fff;z-index:9999;cursor:pointer;user-select:none;opacity:0;transform:scale(.9);transition:opacity .15s ease,transform .15s ease,background-color .15s ease,box-shadow .3s ease;pointer-events:none;",t=document.getElementById("js-player-dialog"))&&t.insertBefore(e,t.childNodes[0])}function initPkg_Refresh_Video_Func(){function i(){let e=!1;var t=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement);let n=!1;(document.querySelector(".wfs-2a8e83.removed-9d4c42")||document.querySelector(".toggle__P8TKM"))&&(e=!0),document.querySelector(".shrink__Sd0uK")&&(n=!0);var o=document.getElementById("js-player-toolbar"),i=(o?o.style=e?"z-index:20":"z-index:30":"function"==typeof ExGuard_warn&&ExGuard_warn("简洁模式","播放器工具条不存在,本次跳过 z-index 调整"),document.getElementsByClassName("case__f4yex")[0]),i=(i&&(i.style=(t||e&&n)&&refresh_Video_getStatus()?"bottom: -84px;":"bottom: 0;"),!!document.getElementsByClassName("live-next-body")[0]);i&&o&&o.parentElement&&(o.parentElement.style="z-index:20")}new DomHook(".right-17e251",!0,()=>{i()}),new DomHook(".video__VfhVg",!0,e=>{for(var t of e)t.target.className.includes("toggle__P8TKM")&&i()});var e=getValidDom([".layout-Player-video",".stream__T55I3"]),t=document.getElementsByClassName("room-Player-Box")[0];let n=document.getElementById("refresh-video3"),a=0,o=!1;function r(){!n||o||(n.style.transition="opacity .15s ease,transform .15s ease,background-color .15s ease,box-shadow .3s ease",n.style.opacity="0",n.style.transform="scale(.9)",n.style.pointerEvents="none",clearTimeout(a))}function l(){n&&(n.style.transition="opacity .15s ease,transform .15s ease,background-color .15s ease,box-shadow .3s ease",n.style.opacity="1",n.style.transform="scale(1)",n.style.pointerEvents="auto",clearTimeout(a),a=setTimeout(()=>{r()},2e3))}function s(){var e=document.getElementsByClassName("PlayerToolbar-ContentRow")[0],t=getValidDom([".layout-Player-video",".stream__T55I3"]),n=document.getElementById("refresh-video");let o=document.getElementById("refresh-video3");e&&t&&n&&(("hidden"==e.style.visibility?(e.style.visibility="visible","function"==typeof ExPanel_onGiftBarShow&&ExPanel_onGiftBarShow(),t.style="",o&&(o.style.opacity="0",o.style.transform="scale(.9)",o.style.pointerEvents="none",o.title="点击隐藏礼物栏"),updateRefreshSwitchUI(!(n.innerText="隐藏礼物栏")),refresh_Video_removeStyle):(e.style.visibility="hidden","function"==typeof ExPanel_onGiftBarHide&&ExPanel_onGiftBarHide(),t.style="bottom:0;z-index:25",n.innerText="✓ 隐藏礼物栏",o&&(o.title="点击显示礼物栏"),updateRefreshSwitchUI(!0),o&&(o.style.transition="opacity .3s ease,transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275),background-color .3s ease,box-shadow .3s ease",o.style.opacity="1",o.style.transform="scale(1.1)",o.style.pointerEvents="auto",o.style.backgroundColor="rgba(0,0,0,.8)",o.style.boxShadow="0 0 15px rgba(255, 102, 0, 0.6)",clearTimeout(a),a=setTimeout(()=>{o.style.transition="opacity .15s ease,transform .15s ease,background-color .15s ease,box-shadow .15s ease",o.style.transform="scale(1)",o.style.backgroundColor="rgba(0,0,0,.55)",o.style.boxShadow="none",a=setTimeout(()=>{r()},1500)},800)),refresh_Video_setStyle))(),i(),saveData_Refresh(),resizeWindow())}e&&n&&(e.addEventListener("mouseenter",()=>{l()}),e.addEventListener("mouseleave",()=>{r()})),t&&n&&t.addEventListener("mousemove",()=>{l()}),n&&(n.addEventListener("mouseenter",()=>{o=!0,n.style.transition="opacity .15s ease,transform .15s ease,background-color .15s ease,box-shadow .3s ease",n.style.opacity="1",n.style.transform="scale(1.08)",n.style.pointerEvents="auto",n.style.backgroundColor="rgba(0,0,0,.7)",clearTimeout(a)}),n.addEventListener("mouseleave",()=>{o=!1,n.style.transform="scale(1)",n.style.backgroundColor="rgba(0,0,0,.55)",l()}));e=document.getElementById("refresh-video");e&&e.addEventListener("click",e=>{s()}),n&&n.addEventListener("click",e=>{e.stopPropagation(),s()})}function updateRefreshSwitchUI(e){var t=document.getElementById("ex-refresh-switch"),n=document.getElementById("ex-refresh-switch-circle");t&&n&&(e?(t.style.background="#f60",n.style.left="14px"):(t.style.background="rgba(255,255,255,0.3)",n.style.left="2px"))}function refresh_Video_getStatus(){var e=document.getElementsByClassName("PlayerToolbar-ContentRow")[0];return!(!e||"hidden"!=e.style.visibility)}function initPkg_Refresh_Video_Set(){var e,t,n,o,i,a=Refresh_readSave().video;a&&1==a.status&&(a=document.getElementsByClassName("PlayerToolbar-ContentRow")[0],e=getValidDom([".layout-Player-video",".stream__T55I3"]),t=document.getElementById("refresh-video"),n=document.getElementById("refresh-video3"),o=document.getElementById("js-player-toolbar"),i=[],a||i.push(".PlayerToolbar-ContentRow"),e||i.push(".layout-Player-video"),i.length&&"function"==typeof ExGuard_warn&&ExGuard_warn("简洁模式","「隐藏礼物栏」恢复时缺少节点:"+i.join(" / ")+",这几步跳过(样式与状态照常恢复)"),a&&(a.style.visibility="hidden"),e&&(e.style="bottom:0;z-index:25"),o&&(o.style=Refresh_readFullScreen()?"z-index:20":"z-index:30",!!document.getElementsByClassName("live-next-body")[0])&&o.parentElement&&(o.parentElement.style="z-index:20"),n&&(n.style.opacity="0",n.style.transform="scale(.9)",n.style.pointerEvents="none",n.title="点击显示礼物栏"),t&&(t.innerText="✓ 隐藏礼物栏"),refresh_Video_setStyle(),resizeWindow(),setTimeout(()=>{updateRefreshSwitchUI(!0)},500))}function refresh_Video_setStyle(){StyleHook_set("Ex_Style_VideoRefresh",`
.PELact,.pushTower-wrapper-gf1HG,.PkView-9f6a2c,.MorePk,.RandomPKBar,.LiveRoomLoopVideo,.LiveRoomDianzan,.maiMaitView-68e80c,.PkView{display:none !important;}
`)}function refresh_Video_removeStyle(){StyleHook_remove("Ex_Style_VideoRefresh")}function initPkg_RemoveAD(){optimizePageStyle(),"function"==typeof initPkg_RemoveMsgNotice&&initPkg_RemoveMsgNotice()}function removeAD(){StyleHook_set("Ex_Style_RemoveAD",`
.ScreenBannerAd,.XinghaiAd,.UserInfo-tryEnterHiddenLead,.AnchorPocketTips,.FishShopTip,.FollowGuide,.RoomText-icon-horn,.RoomText-list,.noHandlerAd-0566b9,.DropMenuList-ad,.DropPane-ad,.igl_bg-b0724a,.closure-ab91fb,.VideoAboveVivoAd,.watermark-442a18,.FollowGuide-FadeOut,.FansMedalDialog-normal,.recommendAD-54569e,.recommendApp-0e23eb,.Bottom-ad,.SignBarrage,.SignBaseComponent-sign-ad,.SuperFansBubble,.Frawdroom,.HeaderGif-right,.HeaderGif-left{display:none !important;}
.Barrage-topFloater{z-index:999}
.danmuAuthor-3d7b4a, .danmuContent-25f266{overflow: initial}
.LastLiveTime,.recommendView-3e8b62{display:none !important;}
.feedback-e36e9d{display:none !important;}
.FansMedalEnter-maxFlag{display:none !important;}
.Header-follow-listBox{max-height:640px !important;}
.GuessGameMiniPanelB-wrapper{display:none !important;}
/*优化页面*/
#js-barrage-list-parent{scrollbar-width: none;-ms-overflow-style: none;width:98%;height:100%}
#js-barrage-list-parent::-webkit-scrollbar{display: none;}
/*陪玩*/
.InteractPlayWithEnter-enterTips1{display:none !important;}
/*恢复emoji彩色 chrome加粗情况下emoji会变灰,需要找一个fontweight起始值在500的字体库才可以兼容*/
/*去除还在电脑面前的mask*/
.mask1-63237a,.mask2-a8df6e,.panel1-1484c9,.panel2-5ece0e{
display: none!important;
}
/*左侧悬浮二维码广告*/
.IconCardAdCard{
display: none!important;
}
/*视频右侧的游戏手柄按钮AD*/
.IconCardAd {
display: none!important;
}
/*视频区视频广告*/
.IconCardAdBoundsBox{
display: none!important;
}
/*直播间顶部广告*/
.room-top-banner-box {
display: none!important;
}
/*弹幕框底部进场弹幕信息:显隐由 Shield/RemoveEnter 控制,勿在此写 display 覆盖*/
/*弹幕框顶部广告*/
.aside-top-uspension-box {
display: none!important;
}
#js-player-asideMain {
top: 0!important;
}
#js-player-asideTopSuspension{display:none !important;}
.Search-Panel-Advert{display:none !important;}
/*推广位:德语 werbung = 广告。类名带构建哈希会轮换,故用包含匹配*/
[class*="werbungText"]{display:none !important;}
/*播放器工具条:任务大厅 / 免费火箭。
dataid 比类名稳定,且工具条(.ToolBarCardProxyItem)与展开面板(.InteractItem)
用的是同一套 dataid,所以这里通吃两处,不必分别写选择器。*/
.PlayerToolbar-Task,
[dataid="taskPanel"],
[dataid="webGame"]{display:none !important;}
/*以下用 :has() 连同外层槽位一起收起,否则只藏内容会留空白。
单独成条:不支持 :has() 的浏览器会整条丢弃,上面那条仍生效(内容照藏,只是留白)。
槽位不是只装广告,故必须 :has 精确匹配——
工具条同排还有选手评分/异域商人/至臻殿堂/全民星推,activeItem 槽还有游戏榜/挑战进度。*/
.ToolbarCardModule:has(.PlayerToolbar-Task),
.ToolbarCardModule:has(.ToolBarCardProxyItem[dataid="taskPanel"]),
.ToolbarCardModule:has(.ToolBarCardProxyItem[dataid="webGame"]),
[class*="activeItem__"]:has([class*="werbungText"]){display:none !important;}
/*上面那排是绝对定位 + 写死的 right 偏移(0/78/156…),藏掉一个不会自动补位,会留空白。
改成正常流并反向排列:既让剩下的贴右对齐,又保持原来「从右往左」的顺序。
作用域限定在该容器内,避免误伤其它同名类。*/
[class*="activeContainer__"] [class*="activeBar__"]{width:auto !important;display:flex !important;flex-direction:row-reverse !important;align-items:center !important;}
[class*="activeContainer__"] [class*="activeItem__"]{position:static !important;left:auto !important;right:auto !important;}
`)}function optimizePageStyle(){var e=document.getElementById("js-barrage-list");e&&e.parentNode&&(e.parentNode.id="js-barrage-list-parent")}let isRemoveMsgNotice=0;function initPkg_RemoveMsgNotice(){initPkg_RemoveMsgNotice_Dom(),initPkg_RemoveMsgNotice_Func(),initPkg_RemoveMsgNotice_Set()}function initPkg_RemoveMsgNotice_Dom(){var e=document.createElement("div"),t=(e.style="position: absolute;right: 5px;top: 40px;cursor: pointer;",e.id="ex-removeMsgNotice",e.innerHTML='',e.title="关闭角标提醒",document.getElementsByClassName("PrivateLetter-frame")[0]);t&&t.appendChild(e)}function initPkg_RemoveMsgNotice_Func(){var t=document.getElementById("msg-removeNotice");if(t){let e=t.querySelector("input");t.addEventListener("click",()=>{(1==e.checked?(isRemoveMsgNotice=1,removeMsgNotice):(isRemoveMsgNotice=0,removeMsgNoticeCanel))(),saveData_removeMsgNotice()})}}function initPkg_RemoveMsgNotice_Set(){var e=localStorage.getItem("ExSave_isRemoveMsgNotice");e&&"1"==e&&(isRemoveMsgNotice=1,removeMsgNotice(),e=document.getElementById("msg-removeNotice"))&&(e.querySelector("input").checked=!0)}function removeMsgNotice(){StyleHook_set("Ex_Style_RemoveMsgNotice",".UserInfo .Badge,.ChatLetter-PopUnread{display:none!important;}")}function removeMsgNoticeCanel(){StyleHook_remove("Ex_Style_RemoveMsgNotice")}function saveData_removeMsgNotice(){localStorage.setItem("ExSave_isRemoveMsgNotice",isRemoveMsgNotice)}function initPkg_ChangeDanmakuLengthLimit(){let e=0,t=setInterval(()=>{100<++e?clearInterval(t):null!=document.getElementsByClassName("ChatSend-txt")[0]&&(changeChatTextareaMaxLength(),clearInterval(t))},1e3)}function changeChatTextareaMaxLength(){let e;null!=(e=document.getElementsByClassName("ChatSend-button")[0])&&(e.className="ChatSend-button"),null!=(e=document.getElementsByClassName("ChatSend-txt")[0])&&(e.maxLength=e.maxLength+20)}function initPkg_Reset(){GM_registerMenuCommand("重置所有设置",()=>{Reset_run()})}function Reset_isPluginLocalStorageKey(e){return e.startsWith("ExSave_")||e.startsWith("Ex_")||"Ex_isJoysound"===e||"freetimed"===e}function Reset_clearPluginLocalStorage(){try{var t=[];for(let e=0;elocalStorage.removeItem(e))}catch(e){}}async function Reset_clearGMStorage(){if("function"==typeof GM_deleteValue){let t=[];try{var e;"function"==typeof GM_listValues?(e=GM_listValues(),t=e&&"function"==typeof e.then?await e:e||[]):"undefined"!=typeof GM&&GM.listValues&&(t=await GM.listValues())}catch(e){return}Array.isArray(t)||(t=[]);for(let e=0;e-1!==e.indexOf("group/getBindGroup")?t.replace('"group_status":4','"group_status":0'):t)}function initPkg_RestoreYuba_restore(){var e=RestoreYuba_getYubaId(window.location.href),t=new URLSearchParams(window.location.search).get("exRestore");t&&e!==(t=Number(t))&&(RestoreYuba_initHook(e,t),RestoreYuba_changeDom(e,t))}function RestoreYuba_checkRedirect(){let t=RestoreYuba_getYubaId(window.location.href);t&&getYubaStatus(t).then(e=>{3002==e.status_code&&(e="https://yuba.douyu.com/discussion/4815048/posts?exRestore="+t,window.location.href=e)})}function RestoreYuba_getYubaId(e){e=e.match(/\/discussion\/(\d+)/);return e&&e[1]?e[1]:null}function RestoreYuba_initHook(r,l){let e=["web/group/head","/follow/topic","group/unfollowGroup"];function s(t){return"string"==typeof t&&e.some(e=>t.includes(e))}let a=unsafeWindow.XMLHttpRequest.prototype.open,c=unsafeWindow.XMLHttpRequest.prototype.send,d=(unsafeWindow.XMLHttpRequest.prototype.open=function(e,t,n,o,i){return"string"==typeof t&&t.includes(r)&&!s(t)&&(t=t.replace(new RegExp(r,"g"),l)),a.call(this,e,t,n,o,i)},unsafeWindow.XMLHttpRequest.prototype.send=function(e){var t=this.responseURL||this._url||"";if(!s(t))if(e&&"string"==typeof e&&e.includes(r))e=e.replace(new RegExp(r,"g"),l);else if(e&&e instanceof FormData){var n,o=new FormData;for(n of e.entries()){var i=n[0];let e=n[1];"string"==typeof e&&e.includes(r)&&(e=e.replace(new RegExp(r,"g"),l)),o.append(i,e)}e=o}return c.call(this,e)},unsafeWindow.fetch);unsafeWindow.fetch=function(e,t){let n="";if("string"==typeof e?(n=e).includes(r)&&!s(e)&&(e=e.replace(new RegExp(r,"g"),l)):e instanceof Request&&(n=e.url).includes(r)&&!s(n)&&(e=new Request(n.replace(new RegExp(r,"g"),l),e)),!s(n)&&t&&t.body)if("string"==typeof t.body&&t.body.includes(r))t.body=t.body.replace(new RegExp(r,"g"),l);else if(t.body instanceof FormData){var o,i=new FormData;for(o of t.body.entries()){var a=o[0];let e=o[1];"string"==typeof e&&e.includes(r)&&(e=e.replace(new RegExp(r,"g"),l)),i.append(a,e)}t.body=i}return d.call(unsafeWindow,e,t)}}async function RestoreYuba_changeDom(e,t){t=await getYubaAnchorInfo(t);if(t){t=t.data.generalOP[0];let o=t.avatar,i=t.nick_name;function n(){var e=document.querySelector(".groupavatar__9mD1S .image__GNnZC"),t=(e&&(e.src=o),document.getElementsByClassName("groupname__BUzOM")[0]),n=(t&&(t.innerText=i),document.getElementsByClassName("groupdesc__b8-53")[0]);n&&(n.innerText=i+"的鱼吧"),e||t||n||ExGuard_warn("鱼吧恢复","群头像/群名/群简介节点都不在,本次只改标题"),document.title=i+"的鱼吧"}n(),new DomHook(".groupavatar__9mD1S",!1,()=>{n()})}}function getYubaAnchorInfo(e){return new Promise(t=>{fetch("https://yuba.douyu.com/wbapi/web/group/managersdetail?group_id="+e).then(e=>e.json()).then(e=>{t(e)}).catch(()=>{t(null)})})}function getYubaStatus(e){return new Promise((t,n)=>{fetch("https://yuba.douyu.com/wbapi/web/group/head?group_id="+e).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{n(e)})})}let ROOM_REVENUE_INTERVAL=15e4,ROOM_REVENUE_API="https://dy.roozj.com/api/ranking/anchors",roomRevenueState={initialized:!1,enabled:!0,timer:null,waitTimer:null,waitTries:0,request:null,context:null,blockedRid:"",cache:new Map,income:null,donors:null,paidDonors:null,speakers:null,updatedAt:null,loading:!1,stale:!1,message:""},roomRevenueRankNode=null;function RoomRevenue_id(e){e=null==e?"":String(e).trim();return/^[1-9]\d*$/.test(e)?e:""}function RoomRevenue_today(){var e=new Date;return e.getFullYear()+"-"+String(e.getMonth()+1).padStart(2,"0")+"-"+String(e.getDate()).padStart(2,"0")}function RoomRevenue_abort(){var e=roomRevenueState.request;if(roomRevenueState.request=null,roomRevenueState.loading=!1,e){e.done=!0;try{e.handle&&e.handle.abort&&e.handle.abort()}catch(e){}}}function RoomRevenue_syncContext(){var e=roomRevenueState,t=window.location.pathname,n=RoomRevenue_id((t.match(/^\/(?:beta\/)?(\d+)(?:\/|$)/)||[])[1]);let o=RoomRevenue_id(void 0===rid?"":rid);e.context&&e.context.path!==t&&(e.blockedRid=e.context.realId||e.blockedRid),e.blockedRid&&o===e.blockedRid&&n!==o?o="":o===e.blockedRid&&o!==n||(e.blockedRid="");var i=RoomRevenue_today(),a={path:t,realId:o,shortId:n,date:i};return a.key=[t,o,n,i].join("|"),e.context&&e.context.key===a.key||(RoomRevenue_abort(),e.context=a,t=e.cache.get(a.key),e.income=t?t.income:null,e.donors=t?t.donors:null,e.paidDonors=t?t.paidDonors:null,e.speakers=t?t.speakers:null,e.updatedAt=t?t.updatedAt:null,e.stale=!!(t&&Date.now()-t.updatedAt>=ROOM_REVENUE_INTERVAL),e.message=""),e.context}function RoomRevenue_visible(){try{let e=Object.getPrototypeOf(document);for(;e;){var t=Object.getOwnPropertyDescriptor(e,"hidden");if(t&&t.get)return!t.get.call(document);e=Object.getPrototypeOf(e)}}catch(e){}return!document.hidden&&"hidden"!==document.visibilityState}function RoomRevenue_render(){var t=document.querySelector(".ex-room-revenue");if(t){var n=roomRevenueState,o=t.querySelector(".ex-room-revenue__value");let e="";null!==n.income?(e+=(0',speakers:'',income:'',refresh:'',source:''};function RoomRevenue_icon(e){var t=document.createElement("span"),n=(t.className="ex-room-revenue__icon ex-room-revenue__icon--"+e,t.setAttribute("aria-hidden","true"),ROOM_REVENUE_ICONS[e]);return n?t.innerHTML=n:t.textContent={donors:"礼",speakers:"言",income:"¥"}[e]||"",t}function RoomRevenue_reserveSpace(t){let e=null;var n,o=t&&(t.closest(".layout-Player-asideMainTop")||t.closest(".layout-Player-asideMain")||t.parentElement);!o||1!==(o=Array.from(o.querySelectorAll(".layout-Player-rank")).filter(function(e){return!e.contains(t)})).length||"absolute"!==(n=window.getComputedStyle(o[0]).position)&&"fixed"!==n||(e=o[0]),roomRevenueRankNode&&roomRevenueRankNode!==e&&roomRevenueRankNode.classList.remove("ex-room-revenue-rank-offset"),(roomRevenueRankNode=e)&&e.classList.add("ex-room-revenue-rank-offset")}function RoomRevenue_mount(){var e=document.querySelector(".layout-Player-announce")||document.querySelector(".layout-Player-rankAll");let t=document.querySelector(".ex-room-revenue");if(!e)return t&&t.remove(),RoomRevenue_reserveSpace(null),0;if((t=t||document.createElement("div")).className="ex-room-revenue",!t.querySelector(".ex-room-revenue__metrics")){t.replaceChildren();var n,o=document.createElement("div");o.className="ex-room-revenue__metrics";for(n of["donors","speakers","income"]){var i=document.createElement("span"),a=(i.className="ex-room-revenue__metric",i.dataset.revenueMetric=n,i.appendChild(RoomRevenue_icon(n)),document.createElement("span"));a.className="income"===n?"ex-room-revenue__value":"ex-room-revenue__"+n,i.appendChild(a),o.appendChild(i)}var r=document.createElement("button"),l=(r.type="button",r.className="ex-room-revenue__refresh",r.innerHTML=ROOM_REVENUE_ICONS.refresh||"↻",r.title="刷新今日流水",r.setAttribute("aria-label","刷新今日流水"),r.addEventListener("click",function(e){e.stopPropagation(),RoomRevenue_refresh(!0)}),document.createElement("a"));l.className="ex-room-revenue__source",l.href="https://dy.roozj.com/",l.target="_blank",l.rel="noopener noreferrer",l.innerHTML=ROOM_REVENUE_ICONS.source||"↗",l.title="来源:dy.roozj.com 公开榜单",l.setAttribute("aria-label","查看流水来源 dy.roozj.com"),t.append(o,r,l)}return t.parentNode===e&&e.firstElementChild===t||e.insertBefore(t,e.firstChild),RoomRevenue_reserveSpace(e),RoomRevenue_render(),1}function RoomRevenue_masked(e){return!0===e||1===e||"true"===e||"1"===e}function RoomRevenue_count(e){return("number"==typeof e||"string"==typeof e&&/^\d+$/.test(e.trim()))&&(e=Number(e),Number.isSafeInteger(e))&&0<=e?e:null}function RoomRevenue_parse(e,t){if(!e||!Number.isFinite(Number(e.status))||e.status<200||300<=e.status)return{error:"数据源暂不可用(HTTP错误)"};if(e.finalUrl)try{var n=new URL(e.finalUrl);if("https://dy.roozj.com"!==n.origin||"/api/ranking/anchors"!==n.pathname)return{error:"数据源返回了非榜单页面"}}catch(e){return{error:"数据源地址不可用"}}let o=e.response;null==o&&(o=e.responseText);try{"string"==typeof o&&(o=JSON.parse(o))}catch(e){return{error:"数据源未返回有效JSON(可能是HTML页面)"}}return o&&"object"==typeof o?RoomRevenue_masked(o.isMasked)?{error:"来源未公开此数据"}:0!==o.code&&"0"!==o.code?{error:"数据源返回错误"}:Array.isArray(o.data)?(n=o.data.filter(function(e){return!(!e||"object"!=typeof e)&&(t.realId&&RoomRevenue_id(e.room_id)===t.realId||t.shortId&&RoomRevenue_id(e.vip_id)===t.shortId||!t.realId&&t.shortId&&RoomRevenue_id(e.room_id)===t.shortId)}),(e=(e=t.realId?n.filter(function(e){return RoomRevenue_id(e.room_id)===t.realId}):[]).length?e:n).length?1!==e.length?{error:"榜单房间匹配不唯一"}:RoomRevenue_masked((n=e[0]).isMasked)?{error:"来源未公开此房间流水"}:"number"==typeof(e=n.total_income)||"string"==typeof e&&/^\d+(?:\.\d+)?$/.test(e.trim())?(e=Number(e),!Number.isFinite(e)||e<0?{error:"来源流水数值不可用"}:{income:e,donors:RoomRevenue_count(n.total_fans),paidDonors:RoomRevenue_count(n.paid_fans),speakers:RoomRevenue_count(n.danmu_users)}):{error:"来源暂无有效流水数值"}:{error:"公开榜单未找到本房间"}):{error:"榜单数据格式不可用"}:{error:"数据格式不可用"}}function RoomRevenue_refresh(e){let i=roomRevenueState;if(i.enabled){let o=RoomRevenue_syncContext();if(RoomRevenue_mount()&&RoomRevenue_visible()&&!i.request){var t=i.cache.get(o.key);if(!e&&t&&Date.now()-t.updatedAt=ROOM_REVENUE_INTERVAL,RoomRevenue_render(),"function"!=typeof GM_xmlhttpRequest)return a({error:"当前环境无法请求流水来源"});try{n.handle=GM_xmlhttpRequest({method:"GET",url:ROOM_REVENUE_API+"?startDate="+o.date+"&endDate="+o.date+"&clubName=all&search="+encodeURIComponent(e)+"&limit=50",anonymous:!0,timeout:8e3,responseType:"json",onload:function(e){a(RoomRevenue_parse(e,o))},onerror:function(){a({error:"流水请求失败"})},ontimeout:function(){a({error:"流水请求超时"})},onabort:function(){a({error:"流水请求已取消"})}})}catch(e){a({error:"流水请求失败"})}function a(e){if(!n.done&&i.enabled&&i.request===n){var t=RoomRevenue_syncContext();if(n.done||t.key!==n.key)return RoomRevenue_render();if(!RoomRevenue_visible())return RoomRevenue_abort(),RoomRevenue_render();if(n.done=!0,i.request=null,i.loading=!1,e.error)i.message=e.error,i.stale=null!==i.income;else for(i.income=e.income,i.donors=e.donors,i.paidDonors=e.paidDonors,i.speakers=e.speakers,i.updatedAt=Date.now(),i.stale=!1,i.message="",i.cache.delete(o.key),i.cache.set(o.key,{income:e.income,donors:e.donors,paidDonors:e.paidDonors,speakers:e.speakers,updatedAt:i.updatedAt});8** 天
`,(e=(e=RoomVip_findAnchor())?e.parentElement:null)?(e.insertBefore(t,e.childNodes[0]),t):null)}function RoomVip_writeDays(e,t){if(e)return t<0?e.innerHTML="VIP 已过期 "+Math.abs(t)+" 天":void((e=e.querySelector("#room-vip-expire-days")||document.getElementById("room-vip-expire-days"))&&(e.innerText=t))}function RoomVip_showDays(t){var e=initPkg_RoomVip_Dom();if(e)return RoomVip_writeDays(e,t);roomVipAnchorWaiting||("function"!=typeof ExGuard_pollFor?"function"==typeof ExGuard_warn&&ExGuard_warn("房间VIP","没找到背包入口("+ROOM_VIP_ANCHOR_SELECTORS.join(" / ")+"),本次不显示 VIP 到期天数"):(roomVipAnchorWaiting=!0,ExGuard_pollFor(RoomVip_findAnchor,function(){roomVipAnchorWaiting=!1;var e=initPkg_RoomVip_Dom();e&&RoomVip_writeDays(e,t)},{intervalMs:500,maxTries:20,tag:"房间VIP"})))}function setRoomVipExpireDays(){fetch("https://www.douyu.com/member/platform_task/effect_list",{method:"GET",mode:"no-cors",cache:"default",credentials:"include"}).then(e=>e.text()).then(e=>{let t=null;try{t=(new DOMParser).parseFromString(String(e||""),"text/html")}catch(e){return void("function"==typeof ExGuard_warn&&ExGuard_warn("房间VIP","特效列表页面解析失败",e))}e=t.getElementsByClassName("enter-wraper is-effect");if(e&&0!=e.length){var n,o=e[0].getElementsByClassName("show-effect-more");if(o&&0!=o.length)for(let t=0;t{"function"==typeof ExGuard_warn?ExGuard_warn("房间VIP","读取特效列表失败,本次不显示 VIP 到期天数",e):console.log("请求失败!",e)})}let isRemoveDanmakuBackground=getLocalIsRemoveDanmakuBackground();try{isRemoveDanmakuBackground&&removeDanmakuBackground()}catch(e){ExGuard_warn("屏蔽弹幕背景","启动时应用样式失败,稍后随面板重绘再试",e)}function getLocalIsRemoveDanmakuBackground(){var e=localStorage.getItem("ExSave_isRemoveDanmakuBackground");return!!e&&1===Number(e)}function saveRemoveDanmakuBackground(){localStorage.setItem("ExSave_isRemoveDanmakuBackground",isRemoveDanmakuBackground?1:0)}function removeDanmakuBackground(){StyleHook_set("Ex_Style_RemoveDanmakuBackground",`
.danmuItem-a8616a {
background: none !important;
}
.danmuItem-a8616a div{
background: none;
}
.danmuItem-a8616a > img {
display: none;
}
.danmuItem-a8616a div > img {
display: none;
}
.super-text-f60bfa {
background: none !important;
}
.danmuItem-a8616a .noble-d35c82 {
background: none !important;
}
.customBarrage {
background: none !important;
text-shadow: none !important;
}
.customBarrage > div {
background: none !important;
}
.PlayerCustomBarrage-prefixPlugin--text {
display: none !important;
}
`)}let isRemoveDanmakuImage=getLocalIsRemoveDanmakuImage();function initPkg_Shield_RemoveDanmakuImage(){var t=document.getElementsByClassName("ShieldTool-list")[0];if(!t)return ExGuard_warn("屏蔽弹幕图片","弹幕屏蔽工具条不存在,本次不注入开关");if(!document.getElementById("ex-RemoveDanmakuImage")){t.insertAdjacentHTML("beforeend",`
屏蔽DouyuEx图片
`),isRemoveDanmakuImage&&removeDanmakuImage();let e=document.getElementById("ex-RemoveDanmakuImage");e&&e.addEventListener("click",()=>{(isRemoveDanmakuImage=!isRemoveDanmakuImage)?(removeDanmakuImage(),e.className=e.className.replace("is-noChecked","is-checked")):(StyleHook_remove("Ex_Style_RemoveDanmakuImage"),e.className=e.className.replace("is-checked","is-noChecked")),saveRemoveDanmakuImage()})}}function getLocalIsRemoveDanmakuImage(){var e=localStorage.getItem("ExSave_isRemoveDanmakuImage");return!!e&&1===Number(e)}function saveRemoveDanmakuImage(){localStorage.setItem("ExSave_isRemoveDanmakuImage",isRemoveDanmakuImage?1:0)}function removeDanmakuImage(){StyleHook_set("Ex_Style_RemoveDanmakuImage",`
.danmuItem-a8616a a {
display: none !important;
}
`)}let isRemoveEnterBarrage=getLocalIsRemoveEnterBarrage();function Shield_applyRemoveEnter(){var e=document.getElementById("js-barrage-extend-container");return!!e&&(isRemoveEnterBarrage?e.style.setProperty("display","none","important"):e.style.removeProperty("display"),!0)}function Shield_applyRemoveEnterWhenReady(e){let t=e||0;Shield_applyRemoveEnter()||120<=t||setTimeout(function(){Shield_applyRemoveEnterWhenReady(t+1)},500)}function getLocalIsRemoveEnterBarrage(){var e=localStorage.getItem("ExSave_isRemoveEnterBarrage");return!e||1===Number(e)}function saveRemoveEnterBarrage(){localStorage.setItem("ExSave_isRemoveEnterBarrage",isRemoveEnterBarrage?1:0)}let isRemoveRepeatedDanmaku=getLocalIsRemoveRepeatedDanmaku(),repeatedDanmakuSeconds=getLocalRepeatedDanmakuSeconds(),isEnlargeDanmaku=getLocalIsEnlargeDanmaku(),repeatedDanmakuMap={},repeatedDanmakuUuidMap={},repeatedDanmakuDomMap={},repeatedDanmakuCountMap={},repeatedDanmakuOriginalFontSizeMap=new WeakMap,repeatedDanmakuCleanupTimer=null,repeatedDanmakuDomHook=null,RemoveRepeatedDanmaku_pollOpts={intervalMs:1e3,maxTries:60,tag:"屏蔽重复弹幕"};try{isRemoveRepeatedDanmaku&&removeRepeatedDanmaku()}catch(e){ExGuard_warn("屏蔽重复弹幕","启动时挂载失败,稍后随面板重绘再试",e)}function initPkg_Shield_RemoveRepeatedDanmaku_ScriptHook(){scriptHook({url:"/firstqueue",callback:e=>{let t=e;return t=t.replace("e.display=new e.renderer(e);","e.display=new e.renderer(e);e.display.raw.comment=e;")}})}function RemoveRepeatedDanmaku_getKey(e){var t=e&&e.comment,t=t&&t.data;let n=t&&"string"==typeof t.text?t.text.trim():"";return(n=n||(e&&e.textContent?e.textContent.trim():""))?(e=t&&t.extraData&&t.extraData.exMsSrcRid)?"r"+e+"|"+n:n:""}function removeRepeatedDanmaku(){StyleHook_set("Ex_Style_RemoveRepeatedDanmaku_Count",`
/* 弹幕计数显示样式 */
[data-repeat-count]::before {
content: "x" attr(data-repeat-count);
font-weight: bold;
display: inline-block;
position: absolute;
right: -18px;
bottom: 0;
font-size: 16px;
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
color: inherit;
}
/* 计数跳动动画 */
@keyframes danmaku-combo-bounce {
0% {
transform: scale(1);
}
50% {
transform: scale(1.5);
}
100% {
transform: scale(1);
}
}
/* 应用动画的类 */
.danmaku-combo-animation::before {
animation: danmaku-combo-bounce 0.2s ease-out;
}
`),ExGuard_pollFor(".danmu-fbb2a3",function(){startRepeatedDanmakuCleanupTimer(),repeatedDanmakuDomHook=new DomHook(".danmu-fbb2a3",!1,e=>{try{if(e&&!(e.length<=0)&&isRemoveRepeatedDanmaku)if(e[0].addedNodes.length<=0&&0{var e,t;n.parentNode&&(repeatedDanmakuOriginalFontSizeMap.has(n)||(t=window.getComputedStyle(n),repeatedDanmakuOriginalFontSizeMap.set(n,t.fontSize)),t=repeatedDanmakuOriginalFontSizeMap.get(n),t=parseFloat(t)||20,e=repeatedDanmakuCountMap[o],t=Math.min(t+2*(e-1),40),n.style.fontSize=t+"px",n.setAttribute("data-repeat-count",e),n.classList.remove("danmaku-combo-animation"),requestAnimationFrame(()=>{n.parentNode&&n.classList.add("danmaku-combo-animation")}))}):n&&n.parentNode||(delete repeatedDanmakuDomMap[o],delete repeatedDanmakuCountMap[o])}}else repeatedDanmakuMap[o]=l+1e3*repeatedDanmakuSeconds,repeatedDanmakuDomMap[o]=r,repeatedDanmakuCountMap[o]=1}}}}}catch(e){ExGuard_warn("屏蔽重复弹幕","处理弹幕节点失败(多半是页面结构变化),跳过这一条",e)}})},Object.assign({tag:"屏蔽重复弹幕"},RemoveRepeatedDanmaku_pollOpts))}function cleanupExpiredRepeatedDanmaku(){var e,t,n=Date.now();for([e,t]of Object.entries(repeatedDanmakuMap))t<=n&&(delete repeatedDanmakuMap[e],delete repeatedDanmakuDomMap[e],delete repeatedDanmakuCountMap[e]);for(let[e,t]of Object.entries(repeatedDanmakuUuidMap))t<=n&&delete repeatedDanmakuUuidMap[e]}function startRepeatedDanmakuCleanupTimer(){repeatedDanmakuCleanupTimer=repeatedDanmakuCleanupTimer||setInterval(cleanupExpiredRepeatedDanmaku,2e4)}function stopRepeatedDanmakuCleanupTimer(){repeatedDanmakuCleanupTimer&&(clearInterval(repeatedDanmakuCleanupTimer),repeatedDanmakuCleanupTimer=null),repeatedDanmakuMap={},repeatedDanmakuUuidMap={},repeatedDanmakuDomMap={},repeatedDanmakuCountMap={}}function saveRemoveRepeatedDanmaku(){setLocalIsRemoveRepeatedDanmaku(isRemoveRepeatedDanmaku)}function getLocalIsRemoveRepeatedDanmaku(){return"1"===localStorage.getItem("ExSave_isRemoveRepeatedDanmaku")}function setLocalIsRemoveRepeatedDanmaku(e){localStorage.setItem("ExSave_isRemoveRepeatedDanmaku",e?"1":"0")}function getLocalRepeatedDanmakuSeconds(){var e=localStorage.getItem("ExSave_repeatedDanmakuSeconds");if(e){e=parseInt(e);if(!isNaN(e)&&1<=e&&e<=300)return e}return 5}function setLocalRepeatedDanmakuSeconds(e){localStorage.setItem("ExSave_repeatedDanmakuSeconds",e.toString())}function getLocalIsEnlargeDanmaku(){var e=localStorage.getItem("ExSave_isEnlargeDanmaku");return null!==e&&"1"===e}function setLocalIsEnlargeDanmaku(e){localStorage.setItem("ExSave_isEnlargeDanmaku",e?"1":"0")}function initPkg_Shield(){Shield_applyRemoveEnterWhenReady()}function replacePlayerBarrage(e){return-1===e.indexOf("player_barrage")?e:e.replace(/player_barrage\\":0/g,'player_barrage\\":1').replace(/"player_barrage":0/g,'"player_barrage":1')}function initPkg_ShowDanmaku_ScriptHook(){scriptHook({inline:!0,callback:replacePlayerBarrage})}function initPkg_ShowDanmaku(){responseHook((e,t)=>-1!==e.indexOf("/betard")?replacePlayerBarrage(t):t)}function initPkg_Sign(){initPkg_Sign_Dom(),initPkg_Sign_Func(),"function"==typeof Sign_WatchPoints_boot&&Sign_WatchPoints_boot()}function initPkg_Sign_Dom(){Sign_insertIcon()}function Sign_insertIcon(){var e=document.createElement("div"),t=(e.className="ex-sign",e.innerHTML='',document.getElementsByClassName("ex-panel__wrap")[0]);t&&t.insertBefore(e,t.childNodes[0])}function initPkg_Sign_Func(){let n=document.getElementsByClassName("ex-sign")[0];n&&n.addEventListener("click",function(e){e.stopPropagation();let t=document.querySelector(".sign-panel");t||(createSignPanel(),t=document.querySelector(".sign-panel")),t&&("flex"===t.style.display||"block"===t.style.display?(t.style.removeProperty("display"),t.style.setProperty("display","none","important"),t.classList.remove("miuix-modal-in"),"function"==typeof updateDockActiveIndicator&&updateDockActiveIndicator()):"function"==typeof openMiuixPanelCentered?openMiuixPanelCentered(t,n):t.style.setProperty("display","flex","important"))})}function createSignPanel(){var e=document.querySelector(".sign-panel");if(!e){(e=document.createElement("div")).className="sign-panel miuix-modal";var t=(t=[{key:"client",title:"客户端模拟签到",desc:"模拟手机客户端领取每日免费礼盒"},{key:"yuba",title:"关注鱼吧签到",desc:"关注的所有鱼吧一键打卡领经验"},{key:"stardiscover",title:"星推日常任务",desc:"打卡、口令弹幕、关注任务(自动安全取关)"},{key:"fanshome",title:"粉丝家园与日常",desc:"粉丝家园打卡与钻粉日常领奖"},{key:"points",title:"活动中心签到领积分",desc:"每日签到并领取签到礼包(需登录)"},{key:"watchpoints",title:"看直播领积分(自动)",desc:"本页观看时长达标后自动领取,仅页面可见时计时"}]).map(function(e){return ExUI.row({title:e.title,desc:e.desc,trail:'',legacy:ExUI.lg("row")})}).join(""),l=(e.innerHTML=ExUI.card({title:"签到选项",asideHtml:'按需勾选日常任务',body:t,legacy:ExUI.lg("card",{body:"sign-options-list"})})+ExUI.card({title:"执行状态",asideHtml:'就绪',body:"勾选上方选项后,点击下方按钮开始签到。",bodyId:"sign-log-box",legacy:ExUI.lg("card",{body:"sign-log-box"})})+ExUI.stack({html:ExUI.btn("开始签到",{variant:"primary",id:"sign-panel-start-btn",legacy:ExUI.LG.submitBtn}),cls:"ui-actions"}),document.body.appendChild(e),"function"==typeof ensureMiuixPanelHeader&&ensureMiuixPanelHeader(e,"一键签到"),"function"==typeof ExUI_stickActionBar&&ExUI_stickActionBar(e),t={client:!0,yuba:!0,fanshome:!0,stardiscover:!0,points:!0,watchpoints:!1});try{var n=JSON.parse(localStorage.getItem("ExSave_SignConfig"));n&&"object"==typeof n&&(l=Object.assign({},t,n))}catch(e){}(t=e.querySelectorAll(".sign-checkbox")).forEach(function(e){var t=e.getAttribute("data-key");t&&void 0!==l[t]&&(e.checked=!!l[t]),e.addEventListener("change",function(){l[t]=this.checked;try{localStorage.setItem("ExSave_SignConfig",JSON.stringify(l))}catch(e){}"watchpoints"===t&&"function"==typeof Sign_WatchPoints_setEnabled&&Sign_WatchPoints_setEnabled(this.checked)})}),(n=e.querySelector("#sign-panel-start-btn"))&&n.addEventListener("click",async function(e){e.stopPropagation(),e=document.getElementById("sign-panel-start-btn");var n=document.getElementById("sign-log-box"),t=document.getElementById("sign-status-tag"),o=(e&&(e.disabled=!0),t&&(t.textContent="正在执行",t.style.color="#ff7700"),n&&(n.innerHTML="正在启动已选签到任务...
"),[]);function i(e,t){o.push(e),n&&(n.innerHTML=o.map(function(e){return"• "+e}).join("
"),n.scrollTop=n.scrollHeight),"function"==typeof showMessage&&showMessage(e,t?"success":"info")}try{var a=await executeSignEngine(l,i),r=a&&a.fail?a.fail:0;t&&(t.textContent=0{fetch("https://www.douyu.com/japi/interactnc/web/fanshome/sign",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`ctn=${getCCN()}&rid=`+e}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{console.log("请求失败!",e),n(e)})})}window.createSignPanel=createSignPanel;let signPointsConfigCache={at:0,data:null},SIGN_POINTS_CONFIG_TTL=3e5,SIGN_POINTS_BENIGN_CODES=[31202,31200,31e3,31203,31204];function Sign_Points_fetchConfig(e){var t=Date.now();return!e&&signPointsConfigCache.data&&t-signPointsConfigCache.atNumber(e.endTime)?{ok:!1,why:"活动已结束"}:{ok:!0}):{ok:!1,why:"拿不到活动配置"}}function Sign_Points_isLoginError(e){return!!e&&(300===Number(e.error)||1006900016===Number(e.error)||/登录/.test(String(e.msg||e.message||"")))}function Sign_Points_isVerifyError(e){return e&&/验证|极验|滑块/.test(String(e.msg||e.message||e.data||""))}function Sign_Points_apiError(e,t){return e?Sign_Points_isLoginError(e)?"未登录(请先在斗鱼登录后再试)":Sign_Points_isVerifyError(e)?"需要滑块验证,请到「任务中心」手动签到一次":e.msg||e.message||t||"错误码 "+e.error:t||"请求失败"}function Sign_Points_cookie(e){try{var t=String(document.cookie||"").match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null}catch(e){return null}}function Sign_Points_ctn(){try{if("function"==typeof getCCN)return getCCN()}catch(e){}return Sign_Points_cookie("acf_ccn")||"1"}function Sign_Points_ensureCsrf(){var e=Sign_Points_cookie("cvl_csrf_token");return e?Promise.resolve(e):fetch("https://www.douyu.com/japi/carnival/nc/common/generateCsrf",{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:""}).then(function(){return Sign_Points_cookie("cvl_csrf_token")}).catch(function(){return null})}function Sign_Points_rawPost(e,t){return fetch(e,{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t.join("&")}).then(function(e){return e.json()}).catch(function(){return null})}function Sign_Points_postForm(t,o){function n(e,t){var n=[];e&&t&&n.push(encodeURIComponent(e)+"="+encodeURIComponent(t));for(let e=0;ee.json()).catch(()=>null)}async function f(){try{var e=await fetch("https://www.douyu.com/japi/livebiznc/web/anchorstardiscover/user/task/list?rid="+m,{credentials:"include"}).then(e=>e.json());if(e&&e.data&&Array.isArray(e.data.taskList))return e.data.taskList}catch(e){ExGuard_warn("星推任务","任务列表拉取失败",e)}return[]}async function _(e){var n=String(e);if(u[n]){let t=g;for(let e=0;ee.json()).catch(e=>({error:-1,msg:e.message}));if(o&&(0===Number(o.error)||0===Number(o.code)))return delete u[n],StarDiscover_pendingRemove(n),!0;await sleep(STAR_UNFOLLOW_GAP_MS),t=await getDouyuCtn()}ExGuard_warn("星推关注","主播 "+n+" 取关未成功,已记入待办(下次打开直播间自动补偿)")}return!1}var a=StarDiscover_pendingRead();if(a.length){a.forEach(function(e){u[String(e)]=!0});let t=0;for(let e=0;ee.json()).catch(()=>null);let h=(t&&t.data&&Array.isArray(t.data.rankItemList)?t.data.rankItemList:[]).map(e=>String(e.rid||e.rId||"")).filter(Boolean);h.length||c("【星推任务】榜单为空(活动可能未开或接口异常),后续依赖榜单的任务将自动跳过");var x,v,l=h.slice(0,3);let s=0,y=0;for(let e=0;e4===Number(e.type));let s=E?Number(E.curCompleteNum||0):0;if(5<=s)c("【星推关注】今日关注任务已全部达成 ("+s+"/5)",!0);else{var S=5-s;c("正在执行【星推关注任务】(当前进度 "+s+"/5,需完成 "+S+" 位)..."),g=await getDouyuCtn();let n=new Set;try{var M=await fetch("https://www.douyu.com/wgapi/livenc/liveweb/follow/list?page=1428",{credentials:"include"}).then(e=>e.json()).catch(()=>null);M&&M.data&&Array.isArray(M.data.list)&&M.data.list.forEach(e=>{e.room_id&&n.add(String(e.room_id))})}catch(e){ExGuard_warn("星推关注","既有关注列表拉取失败,本次按空白名单处理(宁可少关注)",e)}let o=new Set,i=(p&&o.add(p),[]),a=(h.forEach(e=>{!e||n.has(e)||o.has(e)||i.push(e)}),0);let e=0;async function T(){var e=ae.json()).catch(()=>null);t&&t.data&&Array.isArray(t.data.list)&&t.data.list.forEach(e=>{e=String(e.rid||e.rId||"");!e||n.has(e)||o.has(e)||i.includes(e)||i.push(e)})}catch(e){ExGuard_warn("星推关注","补候选主播失败(跳过这个源房间)",e)}}await T();let t=0,r=0;for(;s<5&&e<25;){if(e++,0===i.length&&await T(),0===i.length){if(!(ae.json()).catch(e=>({error:-1,msg:e.message}));!L||0!==Number(L.error)&&0!==Number(L.code)?L&&1===Number(L.error)?n.add(C):(r++,ExGuard_warn("星推关注","主播 "+C+" 关注失败("+(L&&(L.msg||L.error)||"无响应")+")")):(u[C]=!0,StarDiscover_pendingAdd(C),await sleep(1800),await _(C)||r++,(I=(P=(await f()).find(e=>4===Number(e.type)))?Number(P.curCompleteNum||0):s)>s?(s=I,t++,c("【星推关注】主播 "+C+" 关注成功并已安全取关 ("+s+"/5)",!0)):c("【星推关注】主播 "+C+" 已处理并安全取关 (当前进度 "+s+"/5)",!0))}catch(e){r++,ExGuard_warn("星推关注","主播 "+C+" 关注单步异常",e)}await sleep(800)}}let l=0;var B=Object.keys(u);for(let e=0;e=WATCH_POINTS_MAX_CLAIMS?t++:0=SIGN_YUBA_MAX_RETRIES?(i.failed++,i.done++,ExGuard_warn("鱼吧签到","("+n+") 连续 "+SIGN_YUBA_MAX_RETRIES+" 次签到失败,已放弃"),void Sign_Yuba_finishRun(i)):(await sleep(2e3),void signYuba(n,o,i));i.countMap[n]=t+1,i.done++,""==e?i.signed++:i.already++;try{await signYubaSupplementary(n)}catch(e){ExGuard_warn("鱼吧签到","("+n+") 补充签到异常",e)}Sign_Yuba_finishRun(i)}},onerror:function(e){Sign_Yuba_markFailed(i,n,"请求失败",e)},ontimeout:function(){Sign_Yuba_markFailed(i,n,"请求超时")}})}async function signYubaSupplementary(t){var e=await signSupplementary(t),n=e&&e.data&&Number(e.data.supplementary_cards)||0;for(let e=0;e观看时间 —开播时间 —',e}function TitleTime_insert(){var t=TitleTime_findAnchor(),n=t?t.parentNode:null;if(n){let e=document.querySelector(".ex-title-time");return(e=e||TitleTime_buildNode()).parentNode===n&&t.nextElementSibling===e||n.insertBefore(e,t.nextSibling),TitleTime_render(),TitleTime_boot(),1}}function TitleTime_waitAnchor(){var e;if(!titleTimePoll||titleTimePoll.done)return e=function(){titleTimePoll=null,TitleTime_insert()},"function"==typeof ExGuard_pollFor?titleTimePoll=ExGuard_pollFor(TitleTime_findAnchor,e,{intervalMs:TITLE_TIME_POLL_INTERVAL_MS,maxTries:TITLE_TIME_POLL_MAX_TRIES,tag:TITLE_TIME_WAIT_TAG}):void(titleTimePoll=TitleTime_pollByTimer(e))}function TitleTime_pollByTimer(e){function t(){n.cancelled||n.done||(TitleTime_findAnchor()?(n.done=!0,e()):(n.tries++,n.tries>=TITLE_TIME_POLL_MAX_TRIES?(n.done=!0,"function"==typeof ExGuard_warn&&ExGuard_warn(TITLE_TIME_WAIT_TAG,"等待「复制直播流」入口 "+Math.round(TITLE_TIME_POLL_INTERVAL_MS*TITLE_TIME_POLL_MAX_TRIES/1e3)+" 秒仍未出现,已放弃(不影响其它功能)")):n.timer=setTimeout(t,TITLE_TIME_POLL_INTERVAL_MS)))}let n={done:!1,cancelled:!1,tries:0,timer:0,cancel:function(){n.cancelled=!0,n.timer=0}};return t(),n}function TitleTime_formatShowTime(e,t){var e=Number(e);return!e||(e=new Date(1e3*e),isNaN(e.getTime()))?"":dateFormat(t||"MM-dd hh:mm",e)}function TitleTime_render(){var n=document.querySelector(".ex-title-time");if(n){var o=titleTimeState,i=o.watchOk?formatSeconds(o.watchSeconds):"—";let e="—",t="—";o.showinfo&&(t=2===o.isShow?e="未开播":(e=TitleTime_formatShowTime(o.showtime)||"—",TitleTime_formatShowTime(o.showtime,"yyyy-MM-dd hh:mm")||"—"));var a,o=n.querySelector('[data-title-time="watch"]'),r=n.querySelector('[data-title-time="start"]');o&&((a=o.querySelector(".ex-title-time__value"))&&(a.textContent=i),o.title="观看时间(今日累计,官方观看任务接口,需登录):"+i),r&&((a=r.querySelector(".ex-title-time__value"))&&(a.textContent=e),r.title="开播时间:"+t),n.title="观看时间(今日累计,官方观看任务接口,需登录):"+i+"\n开播时间:"+t}}function TitleTime_queryData(e){return new Promise(t=>{fetch(e,{method:"GET",mode:"no-cors",credentials:"include"}).then(e=>e.json()).then(e=>{t(e)}).catch(()=>{t({error:-1,data:null})})})}async function TitleTime_queryShowInfo(){var e=await TitleTime_queryData("https://www.douyu.com/swf_api/h5room/"+rid),e=e&&e.data||null;return e&&null!=e.show_time?e:null}function TitleTime_queryTodayWatch(){return TitleTime_queryData("https://www.douyu.com/japi/interactnc/web/fsjk/getCardTaskInfo?rid="+rid)}function TitleTime_refresh(){if(!titleTimeBusy){titleTimeBusy=!0,titleTimeTicks++;let e=!titleTimeState.showinfo||2===titleTimeState.isShow||titleTimeTicks%10==1;Promise.resolve().then(function(){return e?TitleTime_queryShowInfo():null}).then(function(e){return e&&(titleTimeState.showinfo=!0,titleTimeState.showtime=Number(e.show_time)||0,titleTimeState.isShow=void 0===e.show_status?2:Number(e.show_status)),TitleTime_queryTodayWatch()}).then(function(e){titleTimeState.watchOk=!(!e||0!=e.error||!e.data||void 0===e.data.todayWatch),titleTimeState.watchOk&&(titleTimeState.watchSeconds=Number(e.data.todayWatch)||0)}).catch(function(){}).then(function(){titleTimeBusy=!1,TitleTime_render()})}}function TitleTime_boot(){titleTimeBooted||(titleTimeBooted=!0,TitleTime_refresh(),setInterval(TitleTime_refresh,TITLE_TIME_REFRESH_MS))}var curVersion="undefined"!=typeof GM_info&&GM_info.script&&GM_info.script.version?GM_info.script.version:"2026.11.13.01",isNeedUpdate=!1,lastestVersion="";let UPDATE_SEEN_KEY="Ex_LastSeenRemoteVersion",UPDATE_KNOWN_KEY="Ex_LastKnownRemoteVersion",UPDATE_CHECK_TIME_KEY="Ex_LastUpdateCheckTime",UPDATE_CHECK_INTERVAL_MS=432e5;function Update_noteRemoteVersion(e){var t=isNewerVersion(e=String(e||""),curVersion);lastestVersion=(isNeedUpdate=t)?e:"",t&&GM_setValue(UPDATE_KNOWN_KEY,e),Update_refreshTip()}function Update_refreshTip(){var e,t=document.getElementById("ex-update__tip");t&&(e=String(GM_getValue(UPDATE_SEEN_KEY)||""),e=!(!isNeedUpdate||!lastestVersion||lastestVersion===e),t.style.display=e?"block":"none")}let Update_seenBound=!1;function Update_bindSeenOnOpen(){Update_seenBound||(Update_seenBound=!0,document.addEventListener("DouyuEx:thirdLevelOpened",function(e){(e=e&&e.detail&&e.detail.panel)&&e.classList&&e.classList.contains("exupdate-panel")&&isNeedUpdate&&Update_markRemoteSeen()}))}function Update_markRemoteSeen(){lastestVersion&&GM_setValue(UPDATE_SEEN_KEY,lastestVersion),Update_refreshTip()}function Update_stampCheckTime(){try{GM_setValue(UPDATE_CHECK_TIME_KEY,String(Date.now()))}catch(e){}}function isNewerVersion(e,t){if(e&&t)for(var n=String(e).split(".").map(Number),o=String(t).split(".").map(Number),i=0;i',document.getElementsByClassName("ex-panel__wrap")[0]);t&&t.insertBefore(e,t.childNodes[0])}function initPkg_Update_Func(){let n=document.getElementsByClassName("ex-update")[0];n&&n.addEventListener("click",function(e){e.stopPropagation();let t=document.querySelector(".exupdate-panel");t||(createExUpdatePanel(),t=document.querySelector(".exupdate-panel")),t&&("block"===t.style.display?t.style.display="none":("function"==typeof openMiuixPanelCentered?openMiuixPanelCentered(t,n):t.style.display="block",isNeedUpdate&&Update_markRemoteSeen()))})}let UPDATE_VERSION_SOURCES=["https://update.greasyfork.org/scripts/595575.meta.js","https://raw.githubusercontent.com/xayahcore/DouyuEx-RL/main/package.json","https://fastly.jsdelivr.net/gh/xayahcore/DouyuEx-RL@main/package.json","https://cdn.jsdelivr.net/gh/xayahcore/DouyuEx-RL@main/package.json"],UPDATE_VERSION_TIMEOUT=4e3,UPDATE_VERSION_TOTAL_TIMEOUT=6e3;function isVersionLike(e){return/^\d{4}\.\d{2}\.\d{2}\.\d{2}$/.test(String(null==e?"":e).trim())}function extractVersionFromText(e){if(!e)return null;e=String(e);if(-1!==e.indexOf("{"))try{var t=JSON.parse(e);if(t&&isVersionLike(t.version))return String(t.version).trim()}catch(e){}t=e.match(/@version\s+([0-9][0-9.]*)/);return t&&isVersionLike(t[1])?t[1].trim():null}function requestVersionSource(e,t){let n=!1,o=e=>{n||(n=!0,t(e))};"function"==typeof GM_xmlhttpRequest?GM_xmlhttpRequest({method:"GET",url:e,timeout:UPDATE_VERSION_TIMEOUT,onload:function(e){e&&200===e.status?o(e.responseText||e.response||""):o(null)},onerror:function(){o(null)},ontimeout:function(){o(null)},onabort:function(){o(null)}}):fetch(e,{cache:"no-store"}).then(function(e){return e&&e.ok?e.text():null}).then(function(e){o(e)}).catch(function(){o(null)})}function fetchLatestVersion(e){let n=[],t=UPDATE_VERSION_SOURCES.length,o=!1,i=()=>{if(!o){if(o=!0,clearTimeout(a),0===n.length)return e(null);let t=n[0];for(let e=1;e{requestVersionSource(e,e=>{e=extractVersionFromText(e);e&&-1===n.indexOf(e)&&n.push(e),--t<=0&&i()})})}function getExUpdateLogFor(e){var t=void 0!==EX_UPDATE_LOG&&EX_UPDATE_LOG?EX_UPDATE_LOG:null;return t?t[e]||(0===(e=Object.keys(t)).length?null:(e.sort(function(e,t){for(var n=String(e).split(".").map(Number),o=String(t).split(".").map(Number),i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function buildExUpdateCardsHtml(){var e,o,i=getExUpdateLogFor(curVersion),t=getExUpdateLogSections();return i?(e=(e=!((e=void 0!==EX_UPDATE_LOG&&EX_UPDATE_LOG?EX_UPDATE_LOG:null)&&e[curVersion]))?ExUI.prose("当前版本 "+escapeUpdateLogText(curVersion)+" 暂无独立日志条目,以下为最近一条更新日志。","exupdate-panel__note"):"",o=!0,e+t.map(function(e){var t=(t=Array.isArray(i[e])?i[e]:[]).map(function(e){return"• "+formatUpdateLogItem(e)+""}).join(""),n=o?'v'+escapeUpdateLogText(curVersion)+"":"";return o=!1,ExUI.card({title:e,asideHtml:n,body:'",legacy:{card:ExUI.LG.updateCard,head:ExUI.LG.updateHead,title:ExUI.LG.updateTitle}})}).join("")):""}function createExUpdatePanel(){var e=document.querySelector(".exupdate-panel");if(e){if(e.dataset.version===curVersion)return;e.remove()}(e=document.createElement("div")).className="exupdate-panel miuix-modal",e.dataset.version=curVersion;var n,t=ExUI.btn("我已收到",{variant:"primary",id:"exupdate-action-btn"}),t=ExUI.stack({html:"\n "+t+"\n ",cls:"ui-actions"}),o=(e.innerHTML=`
${buildExUpdateCardsHtml()}
${t}
`,document.body.appendChild(e),"function"==typeof ensureMiuixPanelHeader&&ensureMiuixPanelHeader(e,"版本更新"),"function"==typeof ExUI_stickActionBar&&ExUI_stickActionBar(e),e.querySelector("#exupdate-action-btn"));function i(e,t){o.className=n,o.dataset.state=e,o.disabled=!1,"ack"===e?(o.classList.add("exupdate-state-btn--ack"),o.textContent=t||"我已收到"):"check"===e?(o.classList.add("exupdate-state-btn--check"),o.textContent=t||"检查更新"):"checking"===e?(o.classList.add("exupdate-state-btn--checking"),o.textContent=t||"正在检查更新...",o.disabled=!0):"latest"===e?(o.classList.add("exupdate-state-btn--latest"),o.textContent=t||"已是最新"):"upgrade"===e?(o.classList.add("exupdate-state-btn--upgrade"),o.textContent=t||"前往更新"):"error"===e&&(o.classList.add("exupdate-state-btn--error"),o.textContent=t||"检查失败,点击重试")}o&&(n=o.className,isNeedUpdate&&lastestVersion?i("upgrade","前往更新 (v"+lastestVersion+")"):i("check","检查更新"),o.onclick=function(e){e.stopPropagation(),"check"===(e=o.dataset.state)||"latest"===e||"error"===e?(i("checking","正在检查更新..."),fetchLatestVersion(function(e){e?isNewerVersion(e,curVersion)?(i("upgrade","前往更新 (v"+e+")"),Update_noteRemoteVersion(e),"function"==typeof showMessage&&showMessage("【版本更新】检测到新版本 v"+e+",点击前往更新","info")):(i("latest","已是最新 (v"+curVersion+")"),"function"==typeof showMessage&&showMessage("【版本更新】当前版本 v"+curVersion+" 已是最新版本","success")):(i("error","检查失败,点击重试"),"function"==typeof showMessage&&showMessage("【版本更新】检查更新失败,无法连接到更新服务器","error"))})):"upgrade"===e&&(Update_markRemoteSeen(),"function"==typeof GM_openInTab?GM_openInTab("https://greasyfork.org/zh-CN/scripts/595575-douyuex-rl-%E6%96%97%E9%B1%BC%E7%9B%B4%E6%92%AD%E9%97%B4%E5%A2%9E%E5%BC%BA%E6%8F%92%E4%BB%B6-reborn-lite",{active:!0}):window.open("https://greasyfork.org/zh-CN/scripts/595575-douyuex-rl-%E6%96%97%E9%B1%BC%E7%9B%B4%E6%92%AD%E9%97%B4%E5%A2%9E%E5%BC%BA%E6%8F%92%E4%BB%B6-reborn-lite","_blank"))})}function initVersionLifecycleNotice(){try{"function"==typeof GM_deleteValue&&void 0!==GM_getValue("Ex_LastNotifiedVersion")&&GM_deleteValue("Ex_LastNotifiedVersion")}catch(e){}var e=Number(GM_getValue(UPDATE_CHECK_TIME_KEY)||0);Date.now()-e>UPDATE_CHECK_INTERVAL_MS&&setTimeout(()=>{fetchLatestVersion(function(e){e?(Update_stampCheckTime(),Update_noteRemoteVersion(e)):ExGuard_warn("版本更新","例行探测失败(可能是网络或更新源不可达),下次启动会重试")})},5e3)}function Update_checkVersion(){}function formatUpdateLogItem(e){return e=(e=(e=escapeUpdateLogText(e)).replace(/\b([A-Za-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)+|[A-Za-z][A-Za-z0-9]*\.js)\b/g,'$1')).replace(/【([^】]{1,14})】/g,'【$1】')}let EX_UPDATE_LOG_SECTIONS=["新增功能","改进与修复","其它"],EX_UPDATE_LOG={"2026.11.13.01":{"新增功能":["【关注列表·失败重试】关注列表读取失败后不再只能刷新页面:鼠标移到顶部「关注」入口会自动补渲染一次(下拉没展开不发请求);确实没有人在播时显示「当前没有在播的关注」,不再是一片空白。"],"改进与修复":["【关注列表·白屏】读取失败不再让关注列表永久空白:只有增强列表渲染成功后才隐藏原生列表,失败一律还原原生列表并说明原因(登录态失效、接口返回 error 码、数据不完整、渲染异常);请求 8 秒没有回音按失败处理,界面一定会往下走。","【关注列表·数据】开播状态 / 轮播字段缺失时不再把整批条目筛成空(缺字段不等于没开播);昵称、房名、头像等接口文本统一转义,特殊字符按字面量显示;缺少开播时间不再出现「已播NaN秒」;切到「视频动态」等其它 tab 时增强列表自动收起,不再盖住原生内容。","【关注列表·点击】长按与单击改用标准事件监听,不再覆盖页面自己的 mousedown / mouseup;没有双击回调时单击立即执行,回调里的「阻止默认」真正生效。","【自动网页全屏】开启后进房没有全屏:旧主选择器在真机上已 0 命中,兜底又按图标固定下标盲点,且在页面刚开始解析时观察还不存在的 body 会当场抛错。现在按「进入网页全屏」按钮的 SVG 图标签名定位,命中不到再退旧选择器与控制条尾部候选,每点一次都校验 body.is-fullScreen,成功即停;同一个按钮不重复点击,已经全屏直接跳过,本地存储被写坏按未开启处理。","【弹幕·连发误标】连发两条弹幕时,上一条的回执晚到会把新一条误标「可能发送失败」。现在保留最近 5 条 / 10 秒的回执,迟到的回执也能对上;首次判定没有拿到本条回执时再等 1.2 秒复核一次,不再急着下结论。","【移除·查弹幕】「查弹幕」按钮与面板整体移除:doseeing、fz996 两个数据源都已停服,点开也拿不到内容。","【启动·空 DOM】页面刚开始解析时还没有 body / head,样式注入、脚本注入与自动网页全屏会失败甚至抛错,连带排在后面的初始化不再执行(表现为「某几个功能没了,刷新一次又好了」)。现在按 body → head → documentElement 兜底,全都没有就等 DOMContentLoaded 再做;画中画入口的等待加上限并保证清掉定时器,等不到只留一条日志。","【启动·就绪门】自动网页全屏与去广告的初始化移到页面就绪之后,不再在空 DOM 上踩空;init() 只保留协议钩子与不写 DOM 的项。"],"其它":["【测试】新增自动网页全屏回归 3 组(图标签名优先 / 尾部候选兜底 / 已全屏不重复点击与坏存储)并接入 npm test;补齐关注列表失败路径(请求失败 / 接口 error 码 / 字段缺失 / 特殊字符转义)、无 DOM 时的初始化兜底与样式补挂、画中画等待上限、连发回执误标等回归;移除只服务已停服数据源的用例。当前 npm test 为 33 条链。","【构建】DouyuEx_RL.user.js 与 dist 产物随版本同步重建。"]},"2026.11.07.01":{"新增功能":["【直播流水】右侧弹幕区顶部恢复统计条:今日送礼人数、发言人数与鱼翅流水,数据来自 ROZJ 公开主播榜单(dy.roozj.com),每 150 秒更新,可手动刷新或打开来源站核对;未收录、数据受限或请求失败会如实显示状态,不填假零值。图标用 QingIcon 线稿,鼠标悬停给出统计日期、来源与口径说明,开关在油猴菜单里。","【最高画质·基线】起播档位改成「按房间记基线」:基线 = 该房间上次实测到的最高档,存 ExSave_QualityBaseline(按房号记 7 天、最多 30 间,最久未用先淘汰)。只有两个场景补取一次:① 基线 0 起播、档位表首档更高(房间新开 2K);② 基线已不在档位表(主播降档、请求被系统回落)。其余情况一条流播到底,不再二次切流。"],"改进与修复":["【界面·重做】八个三级面板统一到同一套组件与动效(结构、间距、过渡同一份来源):墨色从 #64748b / 10.5px 加深到 #1e293b / 11.5px,字号收成 11 / 11.5 / 12 / 14 / 16 五档、圆角收成 8 档;面板底部操作条改成面板自己的 footer,不再压住内容;次级按钮全站一套 —— 白底 92% + 1px 深色 14% 描边、高 28、字 11.5·600、文字 #0047b3,覆盖 佩戴/卸下、送出/打开、关注在播/最近看过、刷新、保存/删除、抽屉动作行;主按钮统一 44 高。","【图标】Dock 磁贴、三级面板标题、四级卡片头换成同一套 Phosphor 图标:常态线稿、选中填充,平时中性墨 #334155、选中走产品蓝,不再每个入口各配一种颜色。","【直播间工具】每个工具改成「标题 + 一句说明 + 开关」,导出 / 导入 / 名单 / 面板收进抽屉(默认收起),重复投票改为抽屉里的带标签设置行,五个单元格按 回复 → 禁言 → 欢迎 → 礼物 → 投票 排列。","【移除】「弹幕历史」面板整体退役:第三方数据源停服后它已没有数据来源,入口、包与测试一并删除。","【直播间工具·卡死】打开「直播间工具」面板就整页无响应:面板排序挂在 MutationObserver(childList) 上,却又无条件重排 DOM,重排触发同一个观察器,微任务里无限自我重入把主线程占满。现在顺序没变就一个字都不动,排序期间先摘观察器、排完再挂回;展开精灵球、鼠标划过「直播间工具」磁贴不再卡死。","【画质·注入】页面刚开始解析时还没有可挂脚本的 DOM,旧实现一次失败就静默放弃、整套画质系统不生效;现在会等 DOM 出现再注入(最多 5 秒),并加幂等守卫,重复注入只装一次。","【画质·开销】取流响应里的档位表只在起播 12 秒窗口内解析,且每个 XHR 只挂一次监听;补取后的响应补回原请求地址,避免播放器/缓存按空 url 认流。补取失败保留原流并留一条告警,不影响播放。","【测试】修掉构建产物用例里「流水金额」的时序抖动:原来固定等 3.4 秒赌异步回包,机器忙时会偶发假红,现在等值落地再断言。"],"其它":["【界面门禁】新增 CSS 棘轮(规则数 / !important / 重复选择器)并接在 npm test 首位:旧类名产出点 7 → 0、内联样式 93 → 1、重复选择器 11 → 0、!important 1778 → 1768;同时把 855 个采集产物移出 git 索引,docs 下的 PNG 与 snapshot 加入忽略。","【测试】新增画质基线回归 7 组(命中不补取 / 场景 A / 场景 B / 首档未变不切流 / 切档后内存基线同步 / 补取超时保留原响应 / 保护期改写发包)、直播间流水回归、直播间工具排序死循环回归 3 组,全部接入 npm test(33 条链、239 条断言)。","【真机】画质两条路径(6657 首进 0→15 二次切流、252140 基线 15→回落 4→切 0,二次进房零切流)、流水条真实数据与 4 倍放大观感、Dock 八个磁贴逐个 hover,均用 ego 浏览器在真实直播间验收;卡死另有骨架页复现 + Debugger 抓栈对照。","【构建】DouyuEx_RL.user.js 与 dist 产物随版本同步重建。"]},"2026.11.01.01":{"新增功能":["【工具条】点菜单外面就收:二级胶囊菜单、所有三级面板,以及面板里再开出来的子菜单,只要鼠标点在它们之外,一次全部收起 —— 以前只有右上角那个 × 能关,面板开着占住半屏时还得先找到 ×。"],"改进与修复":["【工具条】点菜单外面的判定放在鼠标按下那一刻(捕获阶段):「点外面先收菜单、目标自己的点击再打开新面板」这个顺序天然成立,不会出现刚点开的面板被同一次点击立刻收掉;在面板里按下、拖到外面再松手(框选 / 拖拽)也不算点外面。","【工具条】只认左键:右键按下不会误收菜单;在面板里按下、拖到外面再松手(框选 / 拖拽)同样不算点外面。","【工具条】精灵球的「全部收敛」与二级菜单的 × 改走同一个收敛出口:运行期再开出来的子菜单层(礼物选择器、画中画菜单等)也会一并收起;三级面板清单仍然只有一份,新增面板自动纳入判定。","【工具条】修掉「收起动画没走完就再点精灵球」时点了没反应:160 毫秒的收起动画期间重新展开会真正打开,而不是再收一次。","【稳定性】修掉一处会让插件整体消失的隐患:构建产物是所有包拼进同一个作用域的一份脚本,只要某个包在自身声明语句执行之前就调到告警函数,计数器就会撞上 TDZ(Cannot access ExGuard_warnCounts before initialization)—— 这条异常没有任何兜底能接,会直接掐断顶层脚本,后面的初始化全部不执行(页面里连精灵球都不出现),日志里却只有一条看不懂的 ReferenceError。现在计数器改为挂在函数属性上惰性创建、上限常量改用 var,顶层提前调用只会照常打一条告警,不再中断脚本。","【阻止P2P上传】修掉开启后进未开播房间会抛一条未捕获异常(NotSupportedError: WebRTC P2P disabled by user policy):拦截器的 createOffer / createAnswer 仍然让调用方拿到失败(P2P 起不来),但这个失败 Promise 已经挂好处理器,浏览器不再把它记为「未处理的拒绝」;本地档位被写坏时按「不拦截」处理并留痕,不再让整个包初始化失败。","【粉丝牌页】房间加载不再白等 10 秒:粉丝牌表格只在独立页或房间内点开浮层后才出现,旧实现每次加载都轮询 20 次、等不到再报一条 warning;现在改成盯 body 子树(400ms 节流),浮层什么时候打开就什么时候接住。","【赛事聊天室入口】这个节点只在赛事 / 活动房间才有,普通直播间等 10 秒注定空转;补藏逻辑保留,但等不到不再打 warning,只留一条 debug。","【隐藏礼物栏】删掉已经消失的旧选择器 .right-e7ea5d 的 DomHook(真机 DOM 里命中 0 个,只在每份文档初始化时白发一条「目标不存在」)。"],"其它":["【测试】新增「点外面就关」回归 11 组场景(外部关闭 / 面板内点击 / 二级菜单内点击 / 精灵球与弹幕小尾巴入口不被抢断 / 子菜单层纳入判定 / 无菜单时无副作用 / 拖拽 / 右键 / 监听幂等 / 源码护栏)与 ExGuard 顶层 TDZ 回归 5 组(声明前调用不抛 / 计数不被冲掉 / 上限与按 tag 计数不变 / 源码与产物护栏),均接入 npm test;隐藏礼物栏的 DomHook 用例同步改为现行的两个挂点。","【真机】本轮改动全部在斗鱼真实直播间(开播 9999 / 未开播 74751、登录态)用 ego-browser 验收:点外面收二级+三级、面板内点击不收、精灵球全部收敛、子菜单层内外、右键不误收,并跑了「不绑新代码」的对照组;P2P 修复用新旧拦截器同页 A/B 验证未处理拒绝清零。","【构建】DouyuEx_RL.user.js 与 dist 产物随版本同步重建。"]},"2026.10.30.01":{"新增功能":["【一键续牌】面板新增「粉丝牌明细」:每块粉丝牌列出等级、亲密值、今日亲密度与排名,每行右侧一个「佩戴 / 卸下」按钮,点击直接调斗鱼 operBadge 接口切换佩戴,成功后列表自动刷新(服务端会把原来那块牌一并改为未佩戴)。","【扩展功能】新增「弹幕屏蔽」卡片:屏蔽进场弹幕(发言框上方那行「XXX 来了」)、屏蔽重复弹幕(窗口秒数 + 放大重复弹幕)、屏蔽弹幕背景。三个开关改挂在插件自己的面板里,不再往斗鱼原生菜单塞节点。"],"改进与修复":["【签到】移除已停服的「房间与粉丝牌签到」:斗鱼 checkIn 接口实测对所有房间返回 error=8「功能已下线」,旧逻辑会给每个关注房间发一条注定失败的请求(900 个房间就是 900 条失败);同时移除「钻粉联赛签到」(userSign 接口 404)。签到面板不再出现这两项。","【签到】粉丝家园遇到 1006「非房间粉丝用户」按跳过计,不再算失败;一键签到汇总按「成功 / 失败 / 跳过」分别计数。","【背包】修复礼物到期时间显示成 1970-01-01:接口 expiry 给的是剩余天数(实测 29 / 3 / 1),旧实现当成秒级时间戳乘 1000;现在显示「剩 N 天」,写死的 20×20 方块改为按内容自适应,不再被裁成看不清的黑块。","【一键续牌】修复从二级菜单悬停 / 快捷键打开面板时读不到数据:旧实现只在图标点击那条路刷新,面板会一直停在占位符;现在所有入口都走统一事件,建面板时也会先读一次。","【进场弹幕】未设置过的用户默认屏蔽(恢复旧观感),开关文案与真实显隐保持一致。","【工具条】点精灵球新增「全部收敛」:有三级面板展开时一次收起所有三级面板,并把二级菜单一并折起;三级面板清单收敛成单一常量,避免新增面板时漏登记。","【同屏播放】面板由悬停 / 快捷键打开时也会重画房间列表与档位角标(以前只在点击路径重画)。","【版本更新】面板由悬停 / 快捷键打开时同样会熄灭版本红点。"],"其它":["【测试】新增进场弹幕屏蔽、精灵球全部收敛、一键续牌(数据加载 / 佩戴接口)等回归用例并接入 npm test;签到链路用例同步移除已下线模块。","【构建】DouyuEx_RL.user.js 与 dist 产物随版本同步重建。"]},"2026.10.27.01":{"新增功能":["【同屏播放】新增「多屏观看」:在 Dock 里点「同屏播放」,面板顶部切到「多屏观看」,就能把播放区切成 2 / 3 / 4 / 5 格,最多同时看 5 个直播间(本房间固定占第 1 格,永远是它自己的播放器)。加房有三条路:搜索房间号 / 直播链接 / 主播名,一键列出「关注在播」,以及插件自己记着的「最近看过」(最多 20 个)。格子的布局比例与前后层级全部照斗鱼原生多屏的实测原值复刻,退出后页面恢复原样。","【同屏播放】长按拖拽换位:按住任意一格 300 毫秒进入拖拽(贴着播放器控制条的那 42 像素不会误触),拖动时原地留占位块、落点实时高亮,松手两格就对调。换位只改「哪个房间在哪一格」,视频实例本身不搬家,所以换位过程中画面不闪断、不重新缓冲;拖到空白处或原地松手等于取消。","【同屏播放】每格独立音量、按房间记忆:房间列表里每间房一条音量滑块(外房默认静音,主房间默认 100%),按房间号记住、跨主房间通用;面板顶部会提示「上次配置:N 个房间」,点「一键恢复」就能把上次那几间房一次加回来。","【同屏播放】外房清晰度「自动」档:默认自动,按格子实际大小选档 —— 格子高度占到播放区 45% 以上(两房、四房那种大格)给蓝光 4M,其余按像素高度依次降到高清或流畅,多屏之后不会再给几百像素高的小格喂 2K。也可以手动锁定蓝光 4M / 超清 / 高清 / 流畅,每行都带档位角标;换档是两路画面交叉过渡(新流先静音起播、出画面 0.25 秒淡入、320 毫秒撤掉旧流),不黑屏、不转圈;换完还会对比实际取到的流地址,如实告诉你「画质已切换」「该直播间只提供同一档画质」或「部分直播间未变化」。","【同屏播放】每间房两枚「弹幕」「画面」开关(悬停有说明)。关掉画面的房间不占格子、也不取流(列表里标「未取流」);关掉弹幕的房间不建弹幕连接,一条都不发。两个开关都跟着房间持久化。","【弹幕合并】外房弹幕并入主画面:外房弹幕进入主房间同一个原生弹幕引擎,颜色、渐变、贵族与活动样式全部按斗鱼自己的规则渲染,每条前面加一条「来源横条 + 主播名」,一眼能分清是谁家的弹幕;同一条同时出现在主房间聊天区,带的是那位观众自己的等级徽章与粉丝牌,点昵称能打开原生用户卡片。上屏按每秒最多 12 条的滑动窗口限流,弹幕连接断了会自动重建(连「重连次数用完、socket 已是 null 但列表里还留着」这种最隐蔽的死法也能认出来)。","【标题栏】观看时间与开播时间搬进标题栏,紧挨「复制直播流」右侧:观看时间取自官方「今日观看」接口(需登录,只代表你本人),开播时间取自房间信息;取不到写「—」、未开播写「未开播」,不拿 0 或估算值凑数。标题栏窄的时候两项各自省略,悬停可看完整值,不会把标题挤成两行。","【截图】截图与 GIF 重做:按钮固定在播放器左侧中部(垂直居中,避开浏览器画中画、侧边栏、播放器控制条与弹幕框),单击保存 PNG、按住录制 GIF,文件名带主播名与时间;抓不到画面、跨域污染、编码失败都会给出明确原因,不再静默失败。","【扩展功能】新增「在线工具 · 在线弹幕助手」入口:扩展功能面板最后一张卡里点「打开」,就能在新标签页查看本房间的弹幕数据(第三方站点 douyuex.com);二级菜单上原来那个常驻图标不再出现,缺房间号、弹窗被拦都只提示不报错。"],"改进与修复":["【功能调整 · 第三方数据源停服】右上角「在看直播」的数据源(第三方数据站 doseeing.com)自 2026-09-30 起全线停止服务,此后那条横条只剩一个「贵宾数」,既没有参照也没有对比,本版整条撤下:贵宾数解析、已播 / 已观看的 5 秒切换、150 秒写值定时器、自愈重建与停服说明一并移除,排行榜也不再被横条顶开 34 像素,脚本头部对那个域名的请求授权也摘掉了;弹幕历史面板保留,但不再引导去第三方站点登录,查询失败时统一提示「第三方数据源已停止服务」。停服之后我们试过两条替代路线:一是把客户端能看到的弹幕数据落到本地自建档案,二是让观众之间互相补齐(点对点共享);两条路实测下来都不理想 —— 本地档案只能覆盖自己看过的房间,口径也复刻不了原站;共享缺少可靠的发现与校验机制,数据质量无法保证。因此这套「本地获取数据 + 共享数据」的相关功能整体移除,不再保留半成品入口;本机算得出来的两项没有丢,观看时间与开播时间搬到了标题栏。","【同屏播放】面板口径统一:房间列表叫「同屏里的房间」,清晰度叫「其它房间清晰度」,底部主按钮按状态在「先加一个房间 / 退出同屏」之间切换;还没开同屏时面板第一行也显示当前直播间并标「1 / 5」,主房间的音量条终于有地方可调。房间一多(5 间房时内容比面板高出一截)主按钮常驻面板底部、房间列表自己滚动,增删房间后不会被弹回列表顶部;搜索无结果、主播没开播、同屏已满、链接解析不到房间号都有明确文案,「关注在播」读不到时直接写「读不到关注列表」,不会一直停在「正在加载」。","【同屏播放】面板第一行不再显示成一串房间号,改为显示主播名:先取本页标题栏的主播名,取不到才向后端查一次并记住;直播间链接也不会再被分享参数里的数字拼出错误的房间号。","【同屏播放】点击与原生交互:多屏期间点格子不再跳转新标签页,点「重新加载」真的能点到,原生弹幕的悬停菜单与用户卡片恢复可点(此前整棵原生弹幕树被一层透明覆盖吃掉,看得见点不动);我们自己的面板、编辑区、弹窗都不参与「点格子」判定。","【同屏播放】某一格画面断了但播放器没有报错时(多屏最常见的静默黑屏),那一格会提示「画面卡住了,点「重新加载」」,画面自己恢复后提示自动撤掉;3 秒还没出画面才露出重新加载按钮,8 秒未出画面给「加载缓慢」的提示;拖拽换位、把鼠标拖出窗口再松手这类操作也不会再把某一格永久留在转圈上。","【同屏播放】退出同屏、或把外房删光回到单屏时,外房的流与「哪一格属于谁」一并复位:以前换过位之后再退出,会在 0×0 的隐藏格里给当前直播间偷偷再建一份流,一路播到刷新页面(白耗带宽)。斗鱼是单页应用,切房时同屏会干净退回单屏:销毁全部外房流与定时器、断开外房弹幕连接,不再把旧房间的流挂在游离节点上继续拉。","【同屏播放】换位之后所有延迟回调(掉线看门狗、取流回包、换档超时、起播重试、重载按钮的计时)都改成按「这间房此刻在哪一格」定位:以前换位后看门狗与自动重试会静默失效,极端情况下还会把重试打到隔壁房间;换位之后再改清晰度也真正生效了(以前角标变了、画面没换,因为代码假定「第一格一定是主画面」)。","【同屏播放】本地保存的同屏配置若被写坏(非法清晰度值、对象型房间号等),加载时清洗后忽略,不会拿脏档位去取流。","【同屏播放】底部主按钮的操作区去掉那层白色渐变遮罩,滚动内容直接从按钮后面透出来;「检查更新 / 开始签到 / 立即开始续牌」三个面板的主按钮也改成常驻面板底部、压在最上层,房间或列表再长也点得到。","【同屏播放】编辑条整个退场:加房、删房、切换「弹幕 / 画面」、改外房清晰度全部收进同屏面板,不再在播放器上盖一条编辑条;同时按用户决定删掉「单窗播放」那套老实现(地址输入与载入同屏流那一页、虎牙 / B站 / iframe 内嵌播放、以及标题栏「切换音频线路」按钮与工具条里的同名菜单一并退役),同屏只保留一条路径。","【弹幕合并】外房弹幕所依赖的总线被整扇替换后能重新发现入口:以前会一直往死对象里推报文,表现为「开着同屏却没有外房弹幕」;超限提示与自检文案统一成「其它房间」口径。","【工具条】修复工具条按钮底部的蓝色指示条一旦亮起就不再熄灭:现在它跟着面板打开 / 关闭实时亮灭;鼠标划过图标只负责打开并刷新面板,关闭统一走右上角 × 或 ESC。","【进场弹幕】修复弹幕框底部的进场提示被永久隐藏:那条提示原先靠 CSS 变量的兜底值 none,而写变量的代码要等屏蔽面板渲染过才执行;现在不依赖面板,开页即按真实设置生效,开关文案与实际状态一致。","【多账号】修复切换账号会把本域 cookie 删掉却写回空列表(恢复列表被注释成空数组),以及「一条 cookie 都没有时回调不执行」导致点「+」重新登录没反应;账号数据损坏也不再中断整个切换流程。","【弹幕工具】修复关键词 / 屏蔽规则里一个正则不命中就抛错、把整条派发链(贵宾数、回执、谢礼物、投票、时速…)一起掐断:现在逐项隔离,坏正则与半截规则只留一条 warn;工具条缺失时的初始化也有兜底,不再连坐。","【关注 / 背包 / 弹幕收藏】读取关注列表失败不再永久空白;背包到期时间不再显示成一串裸数字;弹幕收藏的提示点击、搜索框与轮询都补了判空与上限。","【标签任务 / 图片弹幕 / 抽奖 / 屏蔽 / 弹幕面板】一批轮询与请求补上兜底与上限:标签任务接口字段缺失或返回异常不再让整块崩掉;图片弹幕上传失败不再永久卡在「上传中」占位符;抽奖读取粉丝牌列表失败时不再抛错中断整块初始化(被广告拦截插件拦掉请求也算失败,这是常见状态);屏蔽与弹幕面板里那些 1 秒一次、永不停止的轮询,现在到点会自己收工并留一条可诊断的日志。","【DomHook】钩子失败不再静默:会记录失败原因(找不到节点 / 观察失败)并留一条 warn,回调抛异常也不会把观察器带死,关闭钩子可重复调用。","【菜单 / 版本更新】右键菜单里的「检查更新」以前点了毫无反应(它调的是为「去弹窗」刻意留空的函数),现在直接打开「版本更新」面板,面板打不开时也会明确说一声。","【本月消费】明细接口被限流或报错时,原来每 2 秒重试一次、面板永远停在「加载中」;现在最多重试 3 次,取不到就显示「—」并留一条可诊断的日志,坏条目跳过不再抛错。","【房间 VIP / 粉丝牌 / 弹幕小尾巴 / 聊天记忆 / 上次开播】一批「数据不完整就整块崩」的边界:VIP 特效列表里坏一条只跳过那一条、粉丝牌表格缺列不再从某行起整表中断、小尾巴设置被写坏或聊天框晚到会自动重试、聊天记忆在聊天框晚到时不再空转、「上次开播」页 body 未就绪时不再静默。","【直播间工具 / 弹幕小助手 / 账号管理 / 鱼吧恢复 / 视频工具】把 51 处「取不到节点就直接用」的写法全部加上判空与留痕:节点不在时该功能安静地不启用,而不是抛错把整块初始化带崩(以前会出现「初始化失败:自动抢宝箱」这种一个模块连坐一片的情况)。","【签到 / 鱼吧】鱼吧签到失败不再每 2 秒无限重试(重试前先计次、封顶 10 次,放弃时明确告知),分页与补签请求都补上了失败回调,汇总消息一定会出现且只出现一次。","【签到 / 客户端】客户端签到加了超时双保险:请求卡住时按钮不再永久变灰(以前这种情况只能刷新页面)。","【签到 / 房间与粉丝家园】房间签到给出真实成败与「未开播跳过」数量(以前只有一句「N 个房间正在签到中…」);粉丝家园单个房间出错不再让整批中止,失败提示也恢复了。","【扩展功能 / 自动钓鱼】活动信息请求加 15 秒超时且失败一定落地:勾选后不再卡死、模式不再被锁死,连续失败三次会自己停手并提示。","【扩展功能 / 送礼】完成判定改成真实计数(以前第一个请求回来就宣布「赠送完毕」,「执行中」还排在后面),现在按「成功 N/M、失败 K」汇总,全失败用错误样式。","【扩展功能 / 红包与宝箱】红包轮询补上失败处理与自动关闭(连续三次失败就停),补抢递归封顶 5 次;宝箱延迟把 0、负数、乱码归一成合理值(以前填 0 会疯狂抢宝箱)。","【签到 / 星推】执行结果按真实成败汇报(不再「失败全静默却宣布执行完毕」),取关前会确认关注确实是本脚本发起的,避免残留陌生主播;签到引擎也要等子任务真正结束才宣布完成。","【工具条自愈】自愈巡检加了后台跳过与两档节流(长时间无事从 3 秒降到 30 秒一次,恢复正常立刻回快档):切房换节点时以新节点为准、曾经飘到浮动态的工具条也能自动归位,不再出现「切房后工具条飘在中间 / 同时两套工具条」。","【关注列表】切 tab 或面板重绘不再让条目翻倍;渲染改成只替换自己插的节点,不再重解析整个容器把页面自己的节点与监听器一起冲掉。","【弹幕记忆】切房后新聊天框立即可以按 ↑ 回忆:补绑发生在按键到达之前,同一次按键就生效,也不需要常驻定时器;回忆游标改成显式位置(原来指向数组长度、靠「按 ↑ 先减一」对齐),连续回忆不再错位、越过最后一条后能清空输入框。","【工具条 / 本月消费 / 房间 VIP / 粉丝牌】几处「只认某一个固定锚点」的插入改成多选择器 + 有上限等待(等到就补插并幂等绑定):斗鱼改版后这些功能不再整块无声消失;粉丝牌现在房间里的浮层也能用(以前只在独立页生效),重复渲染也不会注释两遍。","【扩展功能】初始化链路改成逐项隔离(与其它包同口径):单个模块出错只报模块名并继续,不会再让其余开关一起失效;主流程那 16 步也不再是裸平铺直调 —— 任何一处抛异常不再把排在后面的控制台、右键菜单、重置、关注列表一起带走。","【上次开播】不再把整个页面串成字符串去找判据:先读页面全局变量,取不到才只扫内联脚本文本,页面很大时开销明显下降,取值语义不变。","【版本红点】以前只要没点过「我已收到」就恒亮(真正探测到新版本时也是同一个小点);现在只有确实探测到更高的版本、且这个版本没被看过才亮,看过即熄灭;探测失败也不再白占 12 小时窗口。"],"其它":["【测试纪律】测试脚本增至 26 个文件,npm test 一条链依次跑完;新增「构建产物四落点验收」并并入 npm test —— 它执行的是 dist 里真正的产物,专盯标题栏时间、同屏主按钮粘底且无渐变、三面板主按钮粘底、扩展功能里的在线弹幕助手入口这四处,防「源码有、产物被摇树删掉」。","【测试纪律】同屏专项 1580 行:掉线看门狗、换位后的回调定位、坐标越界、指针丢失收尾、二次取流先销毁旧实例、脏值容错、退出清定时器、切房收手、过渡中不重复取流、操作区不得再带渐变。","【测试纪律】弹幕合并专项 868 行 10 组:补丁顺序无关、注入恒一次、横条避让渐变、色表逐档、真实报文锚定解析(含 bnn 干扰、@S 反转义、二进制残字符)、限流滑动窗口边界、死连接重建、总线被摘后重新发现。","【测试纪律】新增五套测试:截图抓帧链路(含 toBlob 缺失、跨域污染、长按与单击互不吞并)、弹幕派发隔离(正则不命中 / 坏正则 / async 拒绝)、进场弹幕(没有屏蔽面板时也必须生效)、死源依赖清零、多账号 cookie 恢复与 0 cookie 回调。","【测试纪律】新增「面板死路」1968 行与「DOM 守卫」487 行两套场景,并给 common.js 两段历史死代码补了源码级保险(把门禁那行临时摘掉再跑一遍,证明守卫真的能兜住);签到链路 440 行与扩展功能 4 组场景把失败路径逐一钉住:重试封顶、汇总只出一次、超时归还按钮、请求必 settle、完成判定按真实计数。","【测试纪律】新增公共守卫 ExGuard(带节流的 warn、有上限的轮询、带超时的请求与 Promise)与配套 9 组场景;账号侧 5 组(证据不符不写、空快照不覆盖、幂等、垃圾条目过滤);另新增切房补绑、自愈节流与后台跳过、浮动态归位、覆盖式渲染四类场景。","【测试纪律】本次末轮新增三套专项:标题栏时间 323 行(位置、两个数据来源、三条诚实降级路径)、面板粘底 236 行、扩展入口 289 行;右上角横条撤下的回归改成只钉「横条不再出现」+「头像框三个入口与赛事入口隐藏不跟着丢」,原来的点击跳转用例随横条一起删除。"]}},videoStartTime=0,videoTime_domhook_videoChange=null,videoTime_domhook_showtime=null,videoTime_domhook_hashidChange=null,videoTime_timeout=0,videoTime_currentVid="";function VideoTime_getVideoId(){try{var e=document.getElementsByTagName("demand-video-toolbar")[0].shadowRoot.querySelector("share-hover").getAttribute("hashid");if(e)return e}catch(e){}e=String(window.location.pathname).split("/");return e[e.length-1]}function initPkg_VideoTime(){let o=setInterval(()=>{var e,t,n=document.getElementsByTagName("demand-video")[0];n&&n.shadowRoot&&(e=n.shadowRoot.getElementById("__video"),n=n.shadowRoot.getElementById("demandcontroller-bar").shadowRoot.querySelector("demand-video-controller-progress").shadowRoot.querySelector("demand-video-controller-preview"),t=document.getElementsByTagName("demand-video-toolbar")[0].shadowRoot.querySelector("share-hover"),null!=e)&&n&&t&&(clearInterval(o),VideoTime_setData(),(videoTime_domhook_videoChange=new MutationObserver(function(e){VideoTime_setData()})).observe(e,{attributes:!0,childList:!0,subtree:!1}),(videoTime_domhook_hashidChange=new MutationObserver(function(t){for(let e=0;e"+formatSeconds2(o));break}if("isshow"==n.attributeName){clearTimeout(videoTime_timeout);let e=Number(VideoTime_getShowTime());videoTime_timeout=setTimeout(()=>{VideoTime_setShowTime(String(dateFormat("yyyy-MM-dd hh:mm:ss",new Date(Number(videoStartTime+1e3*e))))+"
"+formatSeconds2(e))},0);break}}})).observe(n,{attributes:!0,childList:!0,subtree:!1}))},1e3)}function VideoTime_setData(){var e=VideoTime_getVideoId();if(e){let t=videoTime_currentVid=e;fetch("https://v.douyu.com/video/video/getVideoUrl?vid="+e,{method:"GET",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(e=>e.json()).then(e=>{t===videoTime_currentVid&&(e=getStrMiddle(e.data.viewthumb[0].url,"--","/"),videoStartTime=new Date(e.replace(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/,"$1-$2-$3 $4:$5:$6")).getTime())}).catch(e=>{console.log("请求失败!",e)})}}function VideoTime_getShowTime(){var e=document.getElementsByTagName("demand-video")[0].shadowRoot.getElementById("demandcontroller-bar").shadowRoot.querySelector("demand-video-controller-progress").shadowRoot.querySelector("demand-video-controller-preview").getAttribute("showtime");return Number(e).toFixed(0)}function VideoTime_setShowTime(e){var t=document.getElementsByTagName("demand-video")[0].shadowRoot.getElementById("demandcontroller-bar").shadowRoot.querySelector("demand-video-controller-progress").shadowRoot.querySelector("demand-video-controller-preview").shadowRoot.querySelector(".Preview label");t&&(t.style.position="relative",t.style.bottom="60px",t.style.backgroundColor="rgba(0,0,0,0.4)",t.innerHTML=e)}var CameraCapture_MIME_PNG="image/png",CameraCapture_MIME_GIF="image/gif",CameraCapture_MIN_READY_STATE=2,CameraCapture_REASON_TEXT={"no-video":"没有找到视频元素(播放器还没渲染出来,等画面出来再点)","video-not-ready":"视频还没出首帧,浏览器不允许抓帧(等画面出来再点一次)","video-no-dimension":"视频尺寸是 0×0(视频未加载或已被隐藏)","no-2d-context":"浏览器没有给出 2d 画布上下文","draw-image-failed":"抓帧失败(drawImage 抛错)","canvas-tainted":"画布被跨域视频污染,读不到像素(这类流只能改用 flv.js/MSE 播放)","encode-failed":"图片编码没有返回数据","download-blocked":"下载没有触发(浏览器拦截了自动下载)"};function CameraCapture_padNumber(e){return e<10?"0"+e:""+e}function CameraCapture_timestamp(e){e=e||new Date;return e.getFullYear()+"-"+CameraCapture_padNumber(e.getMonth()+1)+"-"+CameraCapture_padNumber(e.getDate())+" "+CameraCapture_padNumber(e.getHours())+"-"+CameraCapture_padNumber(e.getMinutes())+"-"+CameraCapture_padNumber(e.getSeconds())}function CameraCapture_sanitizeName(e){let t=String(null==e?"":e).replace(/[\\/:*?"<>|\r\n\t]+/g,"_").replace(/\s+/g," ").trim();return t=40<(t=t||"斗鱼").length?t.slice(0,40):t}function CameraCapture_buildFileName(e,t,n){n=n||"png";return"【"+CameraCapture_sanitizeName(e)+"】"+CameraCapture_timestamp(t)+"."+n}function CameraCapture_reasonText(e){e=e||{};return CameraCapture_REASON_TEXT[e.reason]||"未知失败("+(e.reason||"no-reason")+")"}function CameraCapture_failureText(e){e=e||{};return e.detail?CameraCapture_reasonText(e)+"|"+e.detail:CameraCapture_reasonText(e)}function CameraCapture_errorDetail(e){return e?(e.name||"Error")+": "+(e.message||String(e)):""}function CameraCapture_isTaintError(e){return e&&("SecurityError"===e.name||/taint|cross-origin|not allowed to export/i.test(e.message||""))}function CameraCapture_captureFrame(e,t){if(!e)return{ok:!1,reason:"no-video"};var n=e.videoWidth||0,o=e.videoHeight||0;if(!n||!o)return{ok:!1,reason:"video-no-dimension",detail:n+"×"+o};var i="number"==typeof e.readyState?e.readyState:CameraCapture_MIN_READY_STATE;if(i{var n=m();if(n&&"function"==typeof n.getBoundingClientRect){n=n.getBoundingClientRect();if(!(!n||n.width<1||n.height<1))return e>=n.left-4&&e<=n.right+4&&t>=n.top-4&&t<=n.bottom+4}})(e.clientX,e.clientY)?(y(),w()):(t=p())&&"none"!==t.style.display&&w(400))}function E(){var e=p();e&&"none"!==e.style.display&&v()}function S(){var e=m();CameraCapture_captureAndSave({video:e,canvas:"function"==typeof n.getScreenshotCanvas?n.getScreenshotCanvas(e):null,anchorName:g(),onResult:function(e){e&&e.ok?(_("【截图】已保存:"+e.fileName,"success"),"function"==typeof n.onCaptured&&n.onCaptured(e)):h(e,"截图")}})}function M(){r&&(clearInterval(r),r=0);var e=a;if(a=null,c=!1,e&&"function"==typeof e.abort)try{e.abort()}catch(e){}}function T(){r&&(clearInterval(r),r=0);var e=a;if(a=null,c=!1,e){_("【录制】正在生成 gif ...","info"),e.on("finished",function(e){e=CameraCapture_saveBlob(e,CameraCapture_buildFileName(g(),new Date,"gif"));e.ok?_("【录制】gif 已保存:"+e.fileName,"success"):h(e,"录制")});try{e.render()}catch(e){h({reason:"encode-failed",detail:CameraCapture_errorDetail(e)},"录制")}}}function C(e){return e&&"ex-camera-close"===e.id}function P(){f()||(x(),y())}function I(e){C(e.target)||(e.stopPropagation(),x(),d=0,l&&clearTimeout(l),l=setTimeout(function(){l=0;{let t=m();if(t){if("function"!=typeof GIF)_("【录制】gif 组件未加载(gif.js 被拦截?),本次只支持单击截图","error");else if("function"==typeof n.prepareRecording){let e=n.prepareRecording(t);e&&e.canvas&&(M(),a=new GIF({workers:5,quality:3,width:e.width,height:e.height,workerScript:n.workerScript}),c=!0,n.addFrame(t,e.canvas,a),r=setInterval(function(){a&&n.addFrame(t,e.canvas,a)},n.fps||83))}}else h({reason:"no-video"},"录制")}},CameraControl_LONG_PRESS_MS))}function L(e){C(e.target)||(e.stopPropagation(),l&&(clearTimeout(l),l=0),c&&(T(),d=Date.now()+CameraControl_SUPPRESS_CLICK_MS),w())}function B(e){C(e.target)||(e.stopPropagation(),"function"==typeof e.preventDefault&&e.preventDefault(),Date.now()=ByteArray.pageSize)this.newPage();this.pages[this.page][this.cursor++]=val};ByteArray.prototype.writeUTFBytes=function(string){for(var l=string.length,i=0;i=0)this.dispose=disposalCode};GIFEncoder.prototype.setRepeat=function(repeat){this.repeat=repeat};GIFEncoder.prototype.setTransparent=function(color){this.transparent=color};GIFEncoder.prototype.addFrame=function(imageData){this.image=imageData;this.colorTab=this.globalPavarte&&this.globalPavarte.slice?this.globalPavarte:null;this.getImagePixels();this.analyzePixels();if(this.globalPavarte===true)this.globalPavarte=this.colorTab;if(this.firstFrame){this.writeLSD();this.writePavarte();if(this.repeat>=0){this.writeNetscapeExt()}}this.writeGraphicCtrlExt();this.writeImageDesc();if(!this.firstFrame&&!this.globalPavarte)this.writePavarte();this.writePixels();this.firstFrame=false};GIFEncoder.prototype.finish=function(){this.out.writeByte(59)};GIFEncoder.prototype.setQuality=function(quality){if(quality<1)quality=1;this.sample=quality};GIFEncoder.prototype.setDither=function(dither){if(dither===true)dither="FloydSteinberg";this.dither=dither};GIFEncoder.prototype.setGlobalPavarte=function(pavarte){this.globalPavarte=pavarte};GIFEncoder.prototype.getGlobalPavarte=function(){return this.globalPavarte&&this.globalPavarte.slice&&this.globalPavarte.slice(0)||this.globalPavarte};GIFEncoder.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")};GIFEncoder.prototype.analyzePixels=function(){if(!this.colorTab){this.neuQuant=new NeuQuant(this.pixels,this.sample);this.neuQuant.buildColormap();this.colorTab=this.neuQuant.getColormap()}if(this.dither){this.ditherPixels(this.dither.replace("-serpentine",""),this.dither.match(/-serpentine/)!==null)}else{this.indexPixels()}this.pixels=null;this.colorDepth=8;this.palSize=7;if(this.transparent!==null){this.transIndex=this.findClosest(this.transparent,true)}};GIFEncoder.prototype.indexPixels=function(imgq){var nPix=this.pixels.length/3;this.indexedPixels=new Uint8Array(nPix);var k=0;for(var j=0;j=0&&x1+x=0&&y1+y>16,(c&65280)>>8,c&255,used)};GIFEncoder.prototype.findClosestRGB=function(r,g,b,used){if(this.colorTab===null)return-1;if(this.neuQuant&&!used){return this.neuQuant.lookupRGB(r,g,b)}var c=b|g<<8|r<<16;var minpos=0;var dmin=256*256*256;var len=this.colorTab.length;for(var i=0,index=0;i=0){disp=dispose&7}disp<<=2;this.out.writeByte(0|disp|0|transp);this.writeShort(this.delay);this.out.writeByte(this.transIndex);this.out.writeByte(0)};GIFEncoder.prototype.writeImageDesc=function(){this.out.writeByte(44);this.writeShort(0);this.writeShort(0);this.writeShort(this.width);this.writeShort(this.height);if(this.firstFrame||this.globalPavarte){this.out.writeByte(0)}else{this.out.writeByte(128|0|0|0|this.palSize)}};GIFEncoder.prototype.writeLSD=function(){this.writeShort(this.width);this.writeShort(this.height);this.out.writeByte(128|112|0|this.palSize);this.out.writeByte(0);this.out.writeByte(0)};GIFEncoder.prototype.writeNetscapeExt=function(){this.out.writeByte(33);this.out.writeByte(255);this.out.writeByte(11);this.out.writeUTFBytes("NETSCAPE2.0");this.out.writeByte(3);this.out.writeByte(1);this.writeShort(this.repeat);this.out.writeByte(0)};GIFEncoder.prototype.writePavarte=function(){this.out.writeBytes(this.colorTab);var n=3*256-this.colorTab.length;for(var i=0;i>8&255)};GIFEncoder.prototype.writePixels=function(){var enc=new LZWEncoder(this.width,this.height,this.indexedPixels,this.colorDepth);enc.encode(this.out)};GIFEncoder.prototype.stream=function(){return this.out};module.exports=GIFEncoder},{"./LZWEncoder.js":2,"./TypedNeuQuant.js":3}],2:[function(require,module,exports){var EOF=-1;var BITS=12;var HSIZE=5003;var masks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function LZWEncoder(width,height,pixels,colorDepth){var initCodeSize=Math.max(2,colorDepth);var accum=new Uint8Array(256);var htab=new Int32Array(HSIZE);var codetab=new Int32Array(HSIZE);var cur_accum,cur_bits=0;var a_count;var free_ent=0;var maxcode;var clear_flg=false;var g_init_bits,ClearCode,EOFCode;function char_out(c,outs){accum[a_count++]=c;if(a_count>=254)flush_char(outs)}function cl_block(outs){cl_hash(HSIZE);free_ent=ClearCode+2;clear_flg=true;output(ClearCode,outs)}function cl_hash(hsize){for(var i=0;i=0){disp=hsize_reg-i;if(i===0)disp=1;do{if((i-=disp)<0)i+=hsize_reg;if(htab[i]===fcode){ent=codetab[i];continue outer_loop}}while(htab[i]>=0)}output(ent,outs);ent=c;if(free_ent<1<0){outs.writeByte(a_count);outs.writeBytes(accum,0,a_count);a_count=0}}function MAXCODE(n_bits){return(1<0)cur_accum|=code<=8){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}if(free_ent>maxcode||clear_flg){if(clear_flg){maxcode=MAXCODE(n_bits=g_init_bits);clear_flg=false}else{++n_bits;if(n_bits==BITS)maxcode=1<0){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}flush_char(outs)}}this.encode=encode}module.exports=LZWEncoder},{}],3:[function(require,module,exports){var ncycles=100;var netsize=256;var maxnetpos=netsize-1;var netbiasshift=4;var intbiasshift=16;var intbias=1<>betashift;var betagamma=intbias<>3;var radiusbiasshift=6;var radiusbias=1<>3);var i,v;for(i=0;i>=netbiasshift;network[i][1]>>=netbiasshift;network[i][2]>>=netbiasshift;network[i][3]=i}}function altersingle(alpha,i,b,g,r){network[i][0]-=alpha*(network[i][0]-b)/initalpha;network[i][1]-=alpha*(network[i][1]-g)/initalpha;network[i][2]-=alpha*(network[i][2]-r)/initalpha}function alterneigh(radius,i,b,g,r){var lo=Math.abs(i-radius);var hi=Math.min(i+radius,netsize);var j=i+1;var k=i-1;var m=1;var p,a;while(jlo){a=radpower[m++];if(jlo){p=network[k--];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}}}function contest(b,g,r){var bestd=~(1<<31);var bestbiasd=bestd;var bestpos=-1;var bestbiaspos=bestpos;var i,n,dist,biasdist,betafreq;for(i=0;i>intbiasshift-netbiasshift);if(biasdist>betashift;freq[i]-=betafreq;bias[i]+=betafreq<>1;for(j=previouscol+1;j>1;for(j=previouscol+1;j<256;j++)netindex[j]=maxnetpos}function inxsearch(b,g,r){var a,p,dist;var bestd=1e3;var best=-1;var i=netindex[g];var j=i-1;while(i=0){if(i=bestd)i=netsize;else{i++;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist=0){p=network[j];dist=g-p[1];if(dist>=bestd)j=-1;else{j--;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist>radiusbiasshift;if(rad<=1)rad=0;for(i=0;i=lengthcount)pix-=lengthcount;i++;if(delta===0)delta=1;if(i%delta===0){alpha-=alpha/alphadec;radius-=radius/radiusdec;rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(j=0;j
×
`,t=getValidDom(["#js-player-dialog",".layout-Player",".player__jsy1T","#js-player-main",".layout-Player-videoEntity"])||document.body)&&(t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e))}function Camera_isHidden(){var e=localStorage.getItem("ExSave_Camera_Hidden");return!!e&&(e=parseInt(e),Date.now(){e.stopPropagation(),confirm("是否7天内不再显示?")?localStorage.setItem("ExSave_Camera_Hidden",Date.now()+6048e5):n=!0,t.style.display="none"}),Camera_isHidden())return t.style.display="none";camera_controller&&(camera_controller.detach(),camera_controller=null),(camera_controller=CameraControl_create({cameraId:"ex-camera",resolveVideo:Camera_resolveVideoNode,getAnchorName:function(){return camera_anchorName},isHidden:function(){return n||Camera_isHidden()},getScreenshotCanvas:Camera_getScreenshotCanvas,prepareRecording:Camera_prepareRecordingCanvas,addFrame:function(e,t,n){cameraAddFrame(e,t,n,camera_fps)},workerScript:gifworkerBlob,fps:camera_fps})).attach()&&camera_controller.hide()}}function initPkg_VideoTools_Camera_Video(){let t=0,n=setInterval(()=>{t++;var e=document.getElementsByTagName("demand-video")[0],e=e&&e.shadowRoot?e.shadowRoot:null;(liveVideoNode=e?e.getElementById("__video"):null)&&liveVideoNode.videoWidth?(clearInterval(n),e=e.querySelector(".anchor-name"),camera_anchorName=e?String(e.innerText||e.textContent||"").trim():camera_anchorName,initPkg_VideoTools_Camera_Video_Dom(),initPkg_VideoTools_Camera_Video_Func()):60<=t&&clearInterval(n)},1e3)}function initPkg_VideoTools_Camera_Video_Dom(){Camera_Video_insertIcon()}function Camera_Video_insertIcon(){var e,t;!document.getElementById("ex-camera")&&((e=document.createElement("div")).id="ex-camera",e.title="单击截图 长按录制gif",e.innerHTML=`
×
`,t=getValidDom([".Video","#js-player-dialog","#js-player-main"])||document.body)&&(t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e))}function Camera_Video_isHidden(){var e=localStorage.getItem("ExSave_Camera_Hidden");return!!e&&(e=parseInt(e),Date.now(){e.stopPropagation(),confirm("是否7天内不再显示?")?localStorage.setItem("ExSave_Camera_Hidden",Date.now()+6048e5):t=!0,n.style.display="none"}),Camera_Video_isHidden())return n.style.display="none";camera_controller&&(camera_controller.detach(),camera_controller=null),(camera_controller=CameraControl_create({cameraId:"ex-camera",resolveVideo:Camera_Video_resolveVideoNode,getAnchorName:function(){return camera_anchorName},isHidden:function(){return t||Camera_Video_isHidden()},getScreenshotCanvas:Camera_getScreenshotCanvas,prepareRecording:Camera_prepareRecordingCanvas,addFrame:function(e,t,n){cameraAddFrame(e,t,n,camera_fps)},workerScript:gifworkerBlob,fps:camera_fps})).attach()&&camera_controller.hide()}}function Camera_Video_resolveVideoNode(){if(void 0!==liveVideoNode&&liveVideoNode&&liveVideoNode.videoWidth)return liveVideoNode;var e=document.getElementsByTagName("demand-video")[0];if(e&&e.shadowRoot){e=e.shadowRoot.getElementById("__video");if(e)return e}var t=[".Video video","#js-player-dialog video","#js-player-main video","video#__video2"];for(let e=0;e
默认
剪裁
拉伸
`,document.getElementsByClassName("menu-da2a9e")[0]);t&&t.insertBefore(e,t.childNodes[1])}function initPkg_VideoTools_Cinema_Func(){var e=document.getElementById("cinema__default"),e=(e&&e.addEventListener("click",()=>{StyleHook_remove("Ex_Style_Cinema")}),document.getElementById("cinema__cover")),e=(e&&e.addEventListener("click",()=>{setVideoCinemaMode("cover")}),document.getElementById("cinema__fill"));e&&e.addEventListener("click",()=>{setVideoCinemaMode("fill")})}function setVideoCinemaMode(e){var t=String(parseInt(liveVideoNode.style.width)/2.39)+"px",e=(StyleHook_remove("Ex_Style_Cinema"),`
.layout-Player-videoEntity video{object-fit:${e} !important;height:${t} !important;}
`);StyleHook_set("Ex_Style_Cinema",e)}let icon_joysound_on='
',icon_joysound_off='
';function initPkg_VideoTools_Joysound(){initPkg_VideoTools_Joysound_Menu(),initPkg_VideoTools_Joysound_Func()}function Joysound_isEnabled(){return unsafeWindow.hasInstalledJoysound&&1==localStorage.getItem("Ex_isJoysound")}function Joysound_updateMenuUI(){var e=document.getElementById("vtoolbar-joysound-switch"),t=document.getElementById("vtoolbar-joysound-icon");e&&(Joysound_isEnabled()?(e.classList.add("is-on"),t&&(t.innerHTML=icon_joysound_on)):(e.classList.remove("is-on"),t&&(t.innerHTML=icon_joysound_off)))}function initPkg_VideoTools_Joysound_Menu(){Joysound_updateMenuUI()}function initPkg_VideoTools_Joysound_Func(){var e=document.getElementById("vtoolbar-menu-joysound");e&&e.addEventListener("click",e=>{e.stopPropagation(),unsafeWindow.hasInstalledJoysound?(1==localStorage.getItem("Ex_isJoysound")?unsafeWindow.disableJoysound():unsafeWindow.enableJoysound(),Joysound_updateMenuUI()):openPage("https://src.douyuex.com/src/joysound.user.js")})}let META_FIELDS=[{key:"dy_cpu_model",label:"CPU"},{key:"dy_gpu_model",label:"显卡"},{key:"dy_device_model",label:"设备"},{key:"dy_os_version",label:"系统"},{key:"z_canvas_code",label:"场景"}],META_PROBE_TIMEOUT=6e3,videoMetaDataCache={rid:null,data:null},isProbingMetaData=!1;function initPkg_VideoTools_MetaData(){initPkg_VideoTools_MetaData_Placeholder()}function initPkg_VideoTools_MetaData_Placeholder(){if(!document.getElementById("ex-metadata")){var e=document.getElementsByClassName("menu-da2a9e")[0];if(e){let t=document.createElement("li");t.id="ex-metadata",t.innerHTML='主播配置信息',t.addEventListener("mouseenter",()=>MetaData_probeByHover(t)),t.addEventListener("click",e=>{e.stopPropagation(),null===MetaData_getCached()&&MetaData_probeNow(t)}),e.insertBefore(t,e.childNodes[1])}}}function MetaData_getCurrentRid(){return String(void 0!==rid&&rid||"")}function MetaData_getCached(){return videoMetaDataCache.rid===MetaData_getCurrentRid()?videoMetaDataCache.data:null}function MetaData_probeByHover(e){var t=MetaData_getCached();null!==t?renderMetaDataContent(e,t,!0):MetaData_probeNow(e)}function MetaData_probeNow(o){if(!isProbingMetaData){isProbingMetaData=!0;var e=o.querySelector(".metadata__wrap");e&&(e.innerHTML="探测中...");let n=MetaData_getCurrentRid();MetaData_probe((e,t)=>{isProbingMetaData=!1,n===MetaData_getCurrentRid()&&(t?(videoMetaDataCache={rid:n,data:e||{}},renderMetaDataContent(o,e||{},!0)):renderMetaDataContent(o,null,!1))})}}function MetaData_hasConfig(t){return t&&META_FIELDS.some(e=>t[e.key])}function MetaData_escape(e){return String(null==e?"":e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function renderMetaDataContent(e,t,n){if(e){e=e.querySelector(".metadata__wrap");if(e)return n?MetaData_hasConfig(t)?void(e.innerHTML=META_FIELDS.filter(e=>t[e.key]).map(e=>`${e.label}
${MetaData_escape(t[e.key])}`).join("")):e.innerHTML="该主播未开启配置上报":e.innerHTML='探测失败点击重试'}}function MetaData_probe(n){let s=(e,t)=>{"function"==typeof n&&n(e||{},!!t)};ExLoadLib(EXURL.flv,()=>{getRealLive_Douyu(rid,!0,!1,"1",e=>{if(!e||"None"===e)return s(null,!1);if("undefined"==typeof flvjs||!flvjs.isSupported())return s(null,!1);var t="Fake_"+Date.now();let n=document.createElement("div"),o=(n.id="exVideoDiv"+t,n.style.display="none",n.innerHTML=``,document.body.appendChild(n),flvjs.createPlayer({type:"flv",url:e},{fixAudioTimestampGap:!1})),i=!1,a=0,r=()=>{clearTimeout(a);try{o.destroy()}catch(e){}try{n.remove()}catch(e){}},l=(e,t)=>{i||(i=!0,r(),s(e,t))};e=flvjs.Events||{};o.on(e.METADATA_ARRIVED||"metadata_arrived",e=>l(e,!0)),o.on("media_info",e=>{e&&e.metadata&&l(e.metadata,!0)}),o.on(e.ERROR||"error",()=>l(null,!1)),a=setTimeout(()=>l(null,!1),META_PROBE_TIMEOUT),o.attachMediaElement(document.getElementById("exVideoPlayer"+t)),o.load()})},()=>s(null,!1))}let icon_pipcontrol_set='
',icon_pipcontrol_send='
',pip_ws_instance=null,pipConfig={fontSize:18,speed:2.5,area:"full",trackHeight:28,mergeMode:"combo",lowPowerMode:!1,filterRobotDanmaku:!0,opacity:1,danmakuVisible:!0},pipControlbarHook=null,pipDocObserver=null,pipControlbarSyncRaf=null,pipDocSyncRaf=null,pipNativeTriggerBtn=null,pipMenuHideTimer=null,pipMenuAnchorBtn=null,pipKeepAliveVideo=null,pipKeepAliveHandle=null,pipKeepAliveCanvas=null,pipVisRecoverHandler=null,pipFrameStallTimer=null,pipFullscreenListenerBound=!1,PIP_MENU_SVG_NATIVE='',PIP_MENU_SVG_ENHANCED='',PIP_BTN_SVG_RELOAD='';function PictureInPictureControl_getDanmakuOpacity(){var e=pipConfig.opacity;return null==e||Number.isNaN(e)?1:Math.min(1,Math.max(.3,e))}function PictureInPictureControl_applyDanmakuStyle(e){e=e||window.__pip_window__;if(e&&!e.closed){var t=e.document.getElementById("danmaku"),e=e.document.getElementById("combo-container"),n=PictureInPictureControl_getDanmakuOpacity(),o=!1!==pipConfig.danmakuVisible;if(t&&(t.style.opacity=String(n),t.style.visibility=o?"visible":"hidden",!o))for(;t.firstChild;)t.removeChild(t.firstChild);e&&(e.style.opacity=String(n),e.style.display=o?"":"none",o||(e.textContent=""))}}function PictureInPictureControl_updateDanmakuToggleBtn(e){var t,e=(e||window.__pip_window__)?.document.getElementById("pip-danmaku-toggle");e&&(t=!1!==pipConfig.danmakuVisible,e.textContent="弹",e.title=t?"隐藏弹幕":"显示弹幕",e.classList.toggle("is-off",!t))}function PictureInPictureControl_initPipUiText(e){var t=e.document,n=t.getElementById("pip-input-field"),o=t.getElementById("pip-submit-btn"),n=(n&&n.setAttribute("placeholder","发条弹幕吧..."),o&&(o.textContent="发送"),t.getElementById("pip-reload")),o=(n&&(n.title="刷新画面(恢复卡屏)"),t.getElementById("pip-back-opener"));o&&(o.textContent="回到网页",o.title="退出画中画并返回直播页"),PictureInPictureControl_updateDanmakuToggleBtn(e)}function PictureInPictureControl_cleanupEnhancedPip(e,t){if(window.__pip_is_active__){window.__pip_is_active__=!1,window.__pip_window__=null,e?.__pip_keydown_handler__&&(e.document.removeEventListener("keydown",e.__pip_keydown_handler__),e.__pip_keydown_handler__=null),PictureInPictureControl_stopTabAntiFreeze(),PictureInPictureControl_toggleSourcePagePower(!1),PictureInPictureControl_toggleMainVideoVisibility(!1),PictureInPictureControl_closePipWebSocket(),PictureInPictureControl_clearWsDedup(),window.__pip_track_state__=[],comboCleanerTimer&&(clearInterval(comboCleanerTimer),comboCleanerTimer=null),comboMap.clear();try{t&&(t.srcObject=null)}catch(e){}if(e&&!e.closed)try{e.close()}catch(e){}}}function PictureInPictureControl_returnToOpener(e,t=!0){var n,e=e||window.__pip_window__,o=e?.__pip_source_video__||document.getElementById("__video2");t&&window.__pip_is_active__&&(n=e?.document?.getElementById("pip-video"),PictureInPictureControl_cleanupEnhancedPip(e,n));try{window.focus()}catch(e){}if(o){try{o.scrollIntoView({block:"nearest",behavior:"smooth"})}catch(e){}!t&&window.__pip_is_active__?PictureInPictureControl_wakeSourceVideo(o).catch(()=>{}):t&&o.play().catch(()=>{})}}function PictureInPictureControl_stopSourceVideoKeepAlive(){var e=pipKeepAliveVideo;if(null!=pipKeepAliveHandle&&e&&"function"==typeof e.cancelVideoFrameCallback)try{e.cancelVideoFrameCallback(pipKeepAliveHandle)}catch(e){}else null!=pipKeepAliveHandle&&clearTimeout(pipKeepAliveHandle);pipKeepAliveHandle=null,pipKeepAliveVideo=null}function PictureInPictureControl_startSourceVideoKeepAlive(n){if(PictureInPictureControl_stopSourceVideoKeepAlive(),n&&window.__pip_is_active__){pipKeepAliveVideo=n,pipKeepAliveCanvas||((pipKeepAliveCanvas=document.createElement("canvas")).width=2,pipKeepAliveCanvas.height=2);let e=pipKeepAliveCanvas.getContext("2d",{willReadFrequently:!0}),t=()=>{if(window.__pip_is_active__&&pipKeepAliveVideo===n){try{2<=n.readyState&&e.drawImage(n,0,0,2,2)}catch(e){}pipKeepAliveHandle="function"==typeof n.requestVideoFrameCallback?n.requestVideoFrameCallback(t):setTimeout(t,200)}};t()}}async function PictureInPictureControl_wakeSourceVideo(o){if(!o)return!1;var e=o.paused,t=(await o.play().catch(()=>{}),"0.01"===o.style.getPropertyValue("opacity"));t&&o.style.removeProperty("opacity");try{window.focus()}catch(e){}await new Promise(e=>{let t=!1,n=()=>{t||(t=!0,e())};"function"==typeof o.requestVideoFrameCallback&&o.requestVideoFrameCallback(()=>{o.requestVideoFrameCallback(n)}),setTimeout(n,150)});try{2<=o.readyState&&pipKeepAliveCanvas&&pipKeepAliveCanvas.getContext("2d",{willReadFrequently:!0}).drawImage(o,0,0,2,2)}catch(e){}return t&&o.style.setProperty("opacity","0.01","important"),e&&o.pause(),!0}async function PictureInPictureControl_reloadPipVideo(e,t){var n=e?.__pip_source_video__||document.getElementById("__video2");if(!n||!t)return!1;await PictureInPictureControl_wakeSourceVideo(n);try{var o=t.srcObject;o&&o.getTracks().forEach(e=>e.stop())}catch(e){}let i=null;try{i=n.captureStream()}catch(e){return!1}t.srcObject=i,n.paused?t.pause():await t.play().catch(()=>{});try{e&&!e.closed&&e.focus()}catch(e){}return!0}function PictureInPictureControl_isTabAntiFreezeEnabled(){return"function"==typeof isTabSwitchEnabled&&isTabSwitchEnabled()}function PictureInPictureControl_startTabAntiFreeze(e,t,n){PictureInPictureControl_isTabAntiFreezeEnabled()&&(PictureInPictureControl_startSourceVideoKeepAlive(e),PictureInPictureControl_bindVisibilityRecover(e,t,n),PictureInPictureControl_startFrameStallWatch(e,t,n))}function PictureInPictureControl_stopTabAntiFreeze(){PictureInPictureControl_stopSourceVideoKeepAlive(),pipVisRecoverHandler&&(document.removeEventListener("visibilitychange",pipVisRecoverHandler),pipVisRecoverHandler=null),pipFrameStallTimer&&(clearTimeout(pipFrameStallTimer),pipFrameStallTimer=null)}function PictureInPictureControl_bindVisibilityRecover(e,t,n){pipVisRecoverHandler&&(document.removeEventListener("visibilitychange",pipVisRecoverHandler),pipVisRecoverHandler=null),pipVisRecoverHandler=()=>{window.__pip_is_active__&&"visible"===document.visibilityState&&PictureInPictureControl_reloadPipVideo(t,n)},document.addEventListener("visibilitychange",pipVisRecoverHandler)}function PictureInPictureControl_startFrameStallWatch(i,a,r){if(pipFrameStallTimer&&(clearTimeout(pipFrameStallTimer),pipFrameStallTimer=null),"function"==typeof i.requestVideoFrameCallback){let e=performance.now(),t=!1,n=()=>{window.__pip_is_active__&&(e=performance.now(),i.requestVideoFrameCallback(n))},o=(i.requestVideoFrameCallback(n),()=>{window.__pip_is_active__&&(pipFrameStallTimer=setTimeout(o,2500),t||i.paused||i.readyState<2||performance.now()-e<4500||(t=!0,PictureInPictureControl_reloadPipVideo(a,r).finally(()=>{e=performance.now(),t=!1})))});pipFrameStallTimer=setTimeout(o,2500)}}function PictureInPictureControl_openPipInputPanel(e){var t,e=e||window.__pip_window__;e&&!e.closed&&(t=e.document.getElementById("input-panel"),e=e.document.getElementById("pip-input-field"),t)&&e&&(t.classList.add("active"),e.focus())}function PictureInPictureControl_getMenuHtml(){return`
`}function initPkg_PictureInPictureControl(){initPkg_PictureInPictureControl_Dom()}function initPkg_PictureInPictureControl_Dom(){PictureInPictureControl_ensureMenuPanel(),PictureInPictureControl_startDocObserver(),pipFullscreenListenerBound||(pipFullscreenListenerBound=!0,document.addEventListener("fullscreenchange",PictureInPictureControl_onFullscreenChange,!0),document.addEventListener("webkitfullscreenchange",PictureInPictureControl_onFullscreenChange,!0),document.addEventListener("mozfullscreenchange",PictureInPictureControl_onFullscreenChange,!0),document.addEventListener("MSFullscreenChange",PictureInPictureControl_onFullscreenChange,!0)),PictureInPictureControl_resetControlbarHook(),PictureInPictureControl_tryBindPipButton()}function PictureInPictureControl_resetControlbarHook(){pipControlbarHook&&(pipControlbarHook.closeHook(),pipControlbarHook=null),document.getElementById("js-player-controlbar")&&(pipControlbarHook=new DomHook("#js-player-controlbar",!0,PictureInPictureControl_onControlbarMutation))}function PictureInPictureControl_isPipBindingValid(){var e=document.getElementById("js-player-controlbar");return pipNativeTriggerBtn&&pipNativeTriggerBtn.isConnected&&e&&e.contains(pipNativeTriggerBtn)}function PictureInPictureControl_stopDocObserver(){pipDocObserver&&("function"==typeof pipDocObserver.closeHook?pipDocObserver.closeHook():pipDocObserver.disconnect?.(),pipDocObserver=null),null!=pipDocSyncRaf&&(cancelAnimationFrame(pipDocSyncRaf),pipDocSyncRaf=null)}function PictureInPictureControl_startDocObserver(){var e;pipDocObserver||PictureInPictureControl_isPipBindingValid()||((e=document.getElementById("js-player-controlbar")?"#js-player-controlbar":document.querySelector(".layout-Player")?".layout-Player":null)?pipDocObserver=new DomHook(e,!0,t=>{if(PictureInPictureControl_isPipBindingValid())PictureInPictureControl_stopDocObserver();else{let e=!1;for(var n of t){for(var o of n.addedNodes){if(PictureInPictureControl_isPipTooltipNode(o)){e=!0,PictureInPictureControl_suppressPipTooltipElement(o);break}if(1===o.nodeType){for(var i of o.children)if(PictureInPictureControl_isPipTooltipNode(i)){e=!0,PictureInPictureControl_suppressPipTooltipElement(i);break}if(e)break}}if(e)break}e&&PictureInPictureControl_scheduleDocSync()}}):setTimeout(PictureInPictureControl_startDocObserver,1e3))}function PictureInPictureControl_isPipTooltipNode(e){return 1===e?.nodeType&&e.classList?.contains("mantine-Tooltip-tooltip")&&"开启画中画"===(e.textContent||"").trim()}function PictureInPictureControl_scheduleDocSync(){PictureInPictureControl_isPipBindingValid()||null==pipDocSyncRaf&&(pipDocSyncRaf=requestAnimationFrame(()=>{pipDocSyncRaf=null,PictureInPictureControl_isPipBindingValid()||(PictureInPictureControl_tryBindPipButton(),PictureInPictureControl_showMenuIfAnchorHovered())}))}function PictureInPictureControl_scheduleControlbarSync(){PictureInPictureControl_isPipBindingValid()||null==pipControlbarSyncRaf&&(pipControlbarSyncRaf=requestAnimationFrame(()=>{pipControlbarSyncRaf=null,PictureInPictureControl_syncControlbar()}))}function PictureInPictureControl_syncControlbar(){if(PictureInPictureControl_isPipBindingValid())return PictureInPictureControl_stopDocObserver();pipNativeTriggerBtn&&!pipNativeTriggerBtn.isConnected&&(pipNativeTriggerBtn=null),PictureInPictureControl_tryBindPipButton(),PictureInPictureControl_isPipBindingValid()&&PictureInPictureControl_stopDocObserver()}function PictureInPictureControl_onControlbarMutation(e){PictureInPictureControl_isPipBindingValid()||(PictureInPictureControl_resetControlbarHook(),pipNativeTriggerBtn&&!pipNativeTriggerBtn.isConnected&&(pipNativeTriggerBtn=null),e&&!PictureInPictureControl_mutationsMayAffectPip(e))||(PictureInPictureControl_startDocObserver(),PictureInPictureControl_scheduleControlbarSync())}function PictureInPictureControl_mutationsMayAffectPip(e){for(var t of e)if("childList"===t.type){for(var n of t.addedNodes)if(PictureInPictureControl_nodeMayBePipRelated(n))return 1;for(let e of t.removedNodes){if(e===pipNativeTriggerBtn)return 1;if(1===e.nodeType&&pipNativeTriggerBtn&&e.contains(pipNativeTriggerBtn))return 1}}else if("attributes"===t.type){var o=t.target;if(o===pipNativeTriggerBtn)return 1;if(1===o.nodeType&&("aria-label"===t.attributeName||"title"===t.attributeName||"aria-describedby"===t.attributeName))if((o.getAttribute("aria-label")||o.title||"").trim().includes("画中画"))return 1}}function PictureInPictureControl_nodeMayBePipRelated(e){if(1===e.nodeType){if(e.matches?.("button, [role='button']"))if((e.getAttribute("aria-label")||e.title||"").trim().includes("画中画"))return 1;return e.querySelector?.("button[aria-label*='画中画'], [role='button'][aria-label*='画中画']")}}function PictureInPictureControl_findNativePipButton(){var e,t=document.getElementById("js-player-controlbar");if(t)for(e of t.querySelectorAll("button, [role='button']"))if((e.getAttribute("aria-label")||e.title||"").trim().includes("画中画"))return e;return null}function PictureInPictureControl_findNativePipButtonFromTooltip(){var e;for(e of document.querySelectorAll(".mantine-Tooltip-tooltip"))if("开启画中画"===(e.textContent||"").trim()&&e.id){var t=document.querySelector(`[aria-describedby="${e.id}"]`);if(t)return t}return null}function PictureInPictureControl_tryBindPipButton(){let e=PictureInPictureControl_findNativePipButton();(e=e||PictureInPictureControl_findNativePipButtonFromTooltip())&&"1"!==e.dataset.exPipBound&&(e.dataset.exPipBound="1",(pipNativeTriggerBtn=e).addEventListener("mouseenter",PictureInPictureControl_onPipBtnEnter),e.addEventListener("mouseleave",PictureInPictureControl_scheduleHideMenu),e.addEventListener("focus",PictureInPictureControl_onPipBtnEnter),e.addEventListener("blur",PictureInPictureControl_scheduleHideMenu),PictureInPictureControl_suppressNativeTooltip(e),PictureInPictureControl_stopDocObserver(),PictureInPictureControl_showMenuIfAnchorHovered())}function PictureInPictureControl_showMenuIfAnchorHovered(){var e=pipNativeTriggerBtn;e&&e.matches(":hover")&&(PictureInPictureControl_suppressNativeTooltip(pipMenuAnchorBtn=e),PictureInPictureControl_showMenu(e))}function PictureInPictureControl_ensureMenuPanel(){var e;document.getElementById("ex-pip-menu-panel")||((e=document.createElement("div")).id="ex-pip-menu-panel",e.className="ex-pip-menu-root",e.setAttribute("role","menu"),e.innerHTML=PictureInPictureControl_getMenuHtml(),document.body.appendChild(e),e.addEventListener("mouseenter",PictureInPictureControl_cancelHideMenu),e.addEventListener("mouseleave",PictureInPictureControl_scheduleHideMenu),e.querySelector('[data-ex-pip-mode="native"]').addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),PictureInPictureControl_hideMenu(),PictureInPictureControl_launchNative()}),e.querySelector('[data-ex-pip-mode="enhanced"]').addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),PictureInPictureControl_hideMenu(),PictureInPictureControl_launchEnhanced()}))}function PictureInPictureControl_onPipBtnEnter(e){PictureInPictureControl_suppressNativeTooltip(pipMenuAnchorBtn=e.currentTarget),PictureInPictureControl_showMenu(pipMenuAnchorBtn)}function PictureInPictureControl_onFullscreenChange(){PictureInPictureControl_ensureMenuPanel(),PictureInPictureControl_resetControlbarHook(),PictureInPictureControl_startDocObserver(),PictureInPictureControl_scheduleDocSync(),setTimeout(()=>{PictureInPictureControl_scheduleDocSync()},250)}function PictureInPictureControl_showMenu(t){PictureInPictureControl_ensureMenuPanel(),PictureInPictureControl_cancelHideMenu();var n=document.getElementById("ex-pip-menu-panel");if(n&&t){n.classList.add("is-visible","is-measuring"),n.style.removeProperty("visibility"),n.style.left="-9999px",n.style.top="0";var t=t.getBoundingClientRect(),o=n.offsetWidth,i=n.offsetHeight,a=t.left+t.width/2-o/2;let e=t.top-i-4;a=Math.max(8,Math.min(a,window.innerWidth-o-8)),e<8&&(e=t.bottom+4),n.classList.remove("is-measuring"),n.style.left=a+"px",n.style.top=e+"px"}}function PictureInPictureControl_hideMenu(){var e=document.getElementById("ex-pip-menu-panel");e&&e.classList.remove("is-visible","is-measuring"),pipMenuAnchorBtn=null}function PictureInPictureControl_cancelHideMenu(){pipMenuHideTimer&&(clearTimeout(pipMenuHideTimer),pipMenuHideTimer=null)}function PictureInPictureControl_scheduleHideMenu(){PictureInPictureControl_cancelHideMenu(),pipMenuHideTimer=setTimeout(()=>{var e=document.getElementById("ex-pip-menu-panel");e&&e.classList.contains("is-visible")&&(e.matches(":hover")||pipMenuAnchorBtn&&pipMenuAnchorBtn.matches(":hover")||PictureInPictureControl_hideMenu())},180)}function PictureInPictureControl_suppressPipTooltipElement(e){e&&"1"!==e.dataset.exPipTooltipHidden&&(e.dataset.exPipTooltipHidden="1",e.style.setProperty("display","none","important"))}function PictureInPictureControl_suppressNativeTooltip(e){if(e){e=e.getAttribute("aria-describedby");if(e){e=document.getElementById(e);if(e&&"开启画中画"===(e.textContent||"").trim())return PictureInPictureControl_suppressPipTooltipElement(e)}}document.querySelectorAll(".mantine-Tooltip-tooltip").forEach(e=>{"开启画中画"===(e.textContent||"").trim()&&PictureInPictureControl_suppressPipTooltipElement(e)})}function PictureInPictureControl_launchNative(){var e=pipNativeTriggerBtn||PictureInPictureControl_findNativePipButton();return e?e.click():(e=document.getElementById("__video2")||document.querySelector(".layout-Player-videoEntity video"))&&"function"==typeof e.requestPictureInPicture?e.requestPictureInPicture().catch(()=>{showMessage("【画中画】无法开启原版画中画","error")}):void showMessage("【画中画】未找到原版画中画按钮","error")}function PictureInPictureControl_launchEnhanced(){if(document.getElementById("__video2"))if(window.documentPictureInPicture){var e=localStorage.getItem("ExSave_PipSet");if(e)try{var t=JSON.parse(e);Object.assign(pipConfig,t)}catch(e){}PictureInPictureControl_handle()}else showMessage("【画中画增强】当前浏览器不支持画中画增强功能,建议使用 Chrome 116+ 或 Edge 116+","error");else showMessage("【画中画增强】当前直播间不支持画中画增强功能","error")}function PictureInPictureControl_toggleMainVideoVisibility(e){var t=document.getElementById("__video2");t&&(e?(t.style.setProperty("opacity","0.01","important"),t.style.setProperty("pointer-events","none","important")):(t.style.removeProperty("opacity"),t.style.removeProperty("pointer-events")))}function PictureInPictureControl_toggleSourcePagePower(t){[".layout-Player-video",".layout-Player-videoEntity",".room-html5-player",".DiamondsFansRankList",".wm-view",".wm-tabv2",".comment-37342a",".DanmuEffectDom",".layout-Player-asideMainTop"].forEach(e=>{e=document.querySelector(e);e&&(t?e.style.setProperty("display","none","important"):e.style.removeProperty("display"))}),[".ChatSend-txt",".ChatSend-button"].forEach(e=>{e=document.querySelector(e);e&&(t?(e.style.setProperty("opacity","0.01","important"),e.style.setProperty("pointer-events","none","important")):(e.style.removeProperty("opacity"),e.style.removeProperty("pointer-events")))}),t||[".layout-Player",".Barrage-list"].forEach(e=>{e=document.querySelector(e);e&&e.style.removeProperty("display")})}function PictureInPictureControl_closePipWebSocket(){if(pip_ws_instance){var e=pip_ws_instance;pip_ws_instance=null,e.msgHandler=()=>{};try{e.close()}catch(e){}}}async function PictureInPictureControl_handle(){var e=document.getElementById("__video2");PictureInPictureControl_closePipWebSocket(),PictureInPictureControl_clearWsDedup(),window.__pip_track_state__=[];let n=await documentPictureInPicture.requestWindow({width:670,height:380,disallowReturnToOpener:!0,preferInitialWindowPlacement:!0}),t=(n.document.body.innerHTML=PictureInPictureControl_getTemplate(),(window.__pip_window__=n).__pip_source_video__=e,n.document.getElementById("pip-video")),o=n.document.getElementById("danmaku");var i=n.document.getElementById("main-view");let a=n.document.getElementById("input-panel");var r=n.document.getElementById("pip-set"),l=n.document.getElementById("pip-send"),s=n.document.getElementById("pip-danmaku-toggle"),c=n.document.getElementById("pip-reload"),d=n.document.getElementById("pip-back-opener");let u=n.document.getElementById("pip-toast");PictureInPictureControl_applyDanmakuStyle(n),PictureInPictureControl_initPipUiText(n),PictureInPictureControl_toggleSourcePagePower(!1),PictureInPictureControl_toggleMainVideoVisibility(!0),!0===pipConfig.lowPowerMode&&PictureInPictureControl_toggleSourcePagePower(!0),t.srcObject=e.captureStream(),await t.play().catch(()=>{}),s&&s.addEventListener("click",e=>{e.stopPropagation(),pipConfig.danmakuVisible=!1===pipConfig.danmakuVisible,localStorage.setItem("ExSave_PipSet",JSON.stringify(pipConfig)),PictureInPictureControl_applyDanmakuStyle(n),PictureInPictureControl_updateDanmakuToggleBtn(n)}),c&&c.addEventListener("click",async e=>{e.stopPropagation();e=await PictureInPictureControl_reloadPipVideo(n,t);u.innerText=e?"画面已刷新":"刷新失败,请检查主页视频",u.classList.add("show"),clearTimeout(u._timer),u._timer=setTimeout(()=>u.classList.remove("show"),2e3)}),d&&d.addEventListener("click",e=>{e.stopPropagation(),PictureInPictureControl_returnToOpener(n)}),r.addEventListener("click",e=>{e.stopPropagation(),PictureInPictureControl_returnToOpener(n,!1),PictureInPictureControl_openSettingPanel(),u.innerText="已在斗鱼直播页面打开设置面板",u.classList.add("show"),clearTimeout(u._timer),u._timer=setTimeout(()=>u.classList.remove("show"),5e3)}),l.addEventListener("click",e=>{e.stopPropagation(),a.classList.contains("active")?a.classList.remove("active"):PictureInPictureControl_openPipInputPanel(n)});s=e=>{var t;"Enter"===e.key&&(t=n.document.getElementById("pip-input-field"),n.document.activeElement!==t)&&(e.preventDefault(),PictureInPictureControl_openPipInputPanel(n))};n.document.addEventListener("keydown",s),n.__pip_keydown_handler__=s,i.addEventListener("click",()=>{a.classList.contains("active")&&a.classList.remove("active")}),PictureInPictureControl_bindSendEvents(n,o),PictureInPictureControl_bindVideoSync(e,t),PictureInPictureControl_startTabAntiFreeze(e,n,t),PictureInPictureControl_startComboCleaner(),pip_ws_instance=new Ex_WebSocket_UnLogin(rid,e=>{window.__pip_is_active__&&!PictureInPictureControl_isDuplicateWsPacket(e)&&PictureInPictureControl_handleComboAndRender(PictureInPictureControl_parseWSMsg(e),n,o)}),PictureInPictureControl_bindCleanup(e,n,t)}function PictureInPictureControl_bindVideoSync(e,t){function n(){e.paused?t.pause():t.play().catch(()=>{})}e.addEventListener("play",n),e.addEventListener("pause",n)}function PictureInPictureControl_bindCleanup(e,t,n){window.__pip_is_active__=!0;let o=()=>PictureInPictureControl_cleanupEnhancedPip(t,n),i=(t.addEventListener("pagehide",o),setInterval(()=>{t.closed&&(clearInterval(i),o())},2e3))}let danmakuTracks=[],comboMap=new Map,comboCleanerTimer=null,pipWsPacketDedup=new Map,PIP_COMBO_MAX_VISIBLE=2,PIP_COMBO_TEXT_MAX=18,PIP_WS_DEDUP_MS=3e3,PIP_WS_DEDUP_MAX=800;function PictureInPictureControl_clearWsDedup(){pipWsPacketDedup.clear()}function PictureInPictureControl_isDuplicateWsPacket(e){var t=Date.now(),n=pipWsPacketDedup.get(e);if(null!=n&&t-nPIP_WS_DEDUP_MAX)for(var[o,i]of pipWsPacketDedup)t-i>PIP_WS_DEDUP_MS&&pipWsPacketDedup.delete(o)}function PictureInPictureControl_getPipWindow(){var e=window.__pip_window__;return e&&!e.closed?e:null}function PictureInPictureControl_truncateComboText(e,t=PIP_COMBO_TEXT_MAX){return!e||e.length<=t?e||"":e.slice(0,t)+"…"}function PictureInPictureControl_refreshComboDisplay(o){var i=o||PictureInPictureControl_getPipWindow(),a=i?.document.getElementById("combo-container");if(a){let t=Date.now();var e,n,r=[];for([e,n]of comboMap.entries()){var l,s=n.timestamps.filter(e=>t-e<=8e3).length;s<2?n.dom=null:(n.displayCount=s,l=n.timestamps[n.timestamps.length-1]||0,r.push({key:e,info:n,count:s,lastTs:l}))}r.sort((e,t)=>t.count-e.count||t.lastTs-e.lastTs),a.innerHTML="";for(let[,e]of comboMap)e.dom=null;var o=r.slice(0,PIP_COMBO_MAX_VISIBLE),c=r.length-o.length;for(let{key:e,info:t,count:n}of o){var d=i.document.createElement("div");d.className="combo-item",d.title=e,d.innerHTML=`${PictureInPictureControl_truncateComboText(e)}×${n}`,a.appendChild(d),t.dom=d}0=s.duration)return o[e]={textWidth:t,speed:r,startTime:Date.now(),duration:1e3*a},e;var d=i-s.speed*(c/1e3),u=d+s.textWidth;if(!(i-16s.speed){u=s.duration-c;if(1e3*(d/(r-s.speed))e.replace(/\s+/g,"").split("").filter((e,t,n)=>n.indexOf(e)===t).join(""),n=t(e);if(n)for(var o of comboMap.keys()){var i=t(o);if(n===i&&Math.abs(e.length-o.length)<=6)return o;if((e.includes(o)||o.includes(e))&&Math.abs(e.length-o.length)<=4)return o}}return e}function PictureInPictureControl_startComboCleaner(){comboCleanerTimer&&clearInterval(comboCleanerTimer),comboCleanerTimer=setInterval(()=>{let t=Date.now();for(var[e,n]of comboMap.entries())n.timestamps.filter(e=>t-e<=8e3).length<2&&comboMap.delete(e);PictureInPictureControl_refreshComboDisplay()},1e3)}function PictureInPictureControl_handleComboAndRender(e,n,o){if(e&&e.text&&!1!==pipConfig.danmakuVisible&&(!my_uid||e.uid!==my_uid)){var i=pipConfig.mergeMode||"combo";if("all"===i)return PictureInPictureControl_renderDanmaku(e,n,o);let t=Date.now();var a=PictureInPictureControl_findMatchKey(e.text),a=(comboMap.has(a)||comboMap.set(a,{timestamps:[],dom:null,displayCount:0}),comboMap.get(a));if(a.timestamps.push(t),"single"===i)return 1t-e<=4e3).length?void 0:PictureInPictureControl_renderDanmaku(e,n,o);a.timestamps=a.timestamps.filter(e=>t-e<=8e3);i=a.timestamps.length;if(1===i)return a.displayCount=0,PictureInPictureControl_renderDanmaku(e,n,o),PictureInPictureControl_refreshComboDisplay(n);a.displayCount=i,PictureInPictureControl_refreshComboDisplay(n)}}function PictureInPictureControl_renderDanmaku(t,i,a,r=!1){if(t&&t.text){let e=i.document.createElement("div");e.className="dm"+(r?" dm-self":""),e.innerText=t.text,e.style.fontSize=pipConfig.fontSize+"px",e.style.color=r?"#00ff66":PictureInPictureControl_getDanmakuColor(t.color),e.style.visibility="hidden",a.appendChild(e);var r=e.offsetWidth,t=i.innerWidth,a=PictureInPictureControl_getTrack(i,r),l=a*pipConfig.trackHeight,a=window.__pip_track_state__[a].duration/1e3;e.style.top=l+"px",e.style.left=t+"px",e.style.visibility="visible";let n="exPipMove_"+Math.random().toString(36).substring(2,9);l=i.document;let o=l.getElementById("ex-danmaku-styles");o||((o=l.createElement("style")).id="ex-danmaku-styles",l.head.appendChild(o)),o.sheet.insertRule(`
@keyframes ${n} {
from { transform: translateX(0); }
to { transform: translateX(-${t+r+30}px); }
}
`,0),e.style.animation=n+` ${a}s linear forwards`,e.addEventListener("animationend",()=>{e.remove();try{var t=o.sheet;for(let e=0;ee.classList.remove("show"),2e3),PictureInPictureControl_renderDanmaku({text:t,color:0},n,o,!0);try{await PictureInPictureControl_SendDanmaku(t)}catch(e){console.error("弹幕发送接口调用失败:",e)}}}i.addEventListener("keydown",e=>{"Enter"===e.key&&t()}),e.addEventListener("click",()=>{t()})}async function PictureInPictureControl_SendDanmaku(e){var t=document.querySelector("div.ChatSend-txt"),n=document.querySelector(".ChatSend-button");return t.innerText=e,n.click(),!0}function PictureInPictureControl_openSettingPanel(){let e=document.getElementById("pip-setting-panel"),t={fontSize:18,speed:2.5,area:"full",trackHeight:28,mergeMode:"combo",lowPowerMode:!1,filterRobotDanmaku:!0,opacity:1,danmakuVisible:!0},n=()=>{localStorage.setItem("ExSave_PipSet",JSON.stringify(pipConfig))},o=()=>{document.getElementById("pip-area").value=pipConfig.area,document.getElementById("pip-mergemode").value=pipConfig.mergeMode||"combo",document.getElementById("pip-lowpowermode").value=!0===pipConfig.lowPowerMode?"on":"off",document.getElementById("pip-filterrobot").value=!1!==pipConfig.filterRobotDanmaku?"on":"off",document.getElementById("pip-tabswitch").value=isTabSwitchEnabled()?"on":"off",document.getElementById("pip-fontsize").value=pipConfig.fontSize,document.getElementById("pip-fontsize-value").innerText=pipConfig.fontSize,document.getElementById("pip-trackheight").value=pipConfig.trackHeight||28,document.getElementById("pip-trackheight-value").innerText=pipConfig.trackHeight||28,document.getElementById("pip-speed").value=pipConfig.speed,document.getElementById("pip-speed-value").innerText=pipConfig.speed;var e=Math.round(100*(null!=pipConfig.opacity?pipConfig.opacity:1));document.getElementById("pip-opacity").value=e,document.getElementById("pip-opacity-value").innerText=e+"%"};if(e)return e.style.display="block",o();(e=document.createElement("div")).id="pip-setting-panel",e.innerHTML=`
弹幕字号
${pipConfig.fontSize}
弹幕上下间距
${pipConfig.trackHeight||28}
弹幕速度
${pipConfig.speed}
弹幕透明度
${Math.round(100*(null!=pipConfig.opacity?pipConfig.opacity:1))}%
弹幕显示区域
重复弹幕合并
短时间内多条相同弹幕内容时的显示方式
屏蔽机器人弹幕
开启后过滤无用户标识的机器人弹幕
原网页低功耗
开启后,拉起画中画时将隐藏原网页视频区、飘屏弹幕与礼物动画,保留右侧弹幕列表,以降低 CPU 占用
页签防冻结
与扩展工具「防页签冻结」共用设置;开启后画中画期间保持源页解码并自动缓解卡屏(关闭需刷新页面后完全生效)
`,document.getElementById("pip-setting-style")||((i=document.createElement("style")).id="pip-setting-style",i.innerHTML=`
#pip-setting-panel {
position: fixed;
width: 440px;
background: rgba(255, 255, 255, 0.98);
border: 1px solid rgba(212, 212, 216, 1);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
border-radius: 12px;
padding: 24px;
z-index: 999999;
font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", sans-serif;
color: #18181b;
box-sizing: border-box;
backdrop-filter: blur(10px);
}
.pip-setting-header {
display: flex;
align-items: center;
justify-content: space-between;
margin: -24px -24px 24px;
padding: 24px 24px 0;
cursor: move;
user-select: none;
}
.pip-setting-title {
flex: 1;
min-width: 0;
font-size: 16px;
font-weight: 600;
color: #000000;
letter-spacing: 0.5px;
margin: 0;
}
.pip-setting-header-actions {
display: flex;
align-items: center;
gap: 12px;
flex-shrink: 0;
}
.pip-setting-reset {
font-size: 14px;
color: #71717a;
cursor: pointer;
transition: color 0.2s;
text-decoration: underline;
user-select: none;
font-weight: 500;
white-space: nowrap;
}
.pip-setting-reset:hover {
color: #ff5d23;
}
.pip-setting-dismiss {
flex-shrink: 0;
width: 28px;
height: 28px;
margin: 0;
padding: 0;
border: none;
border-radius: 6px;
background: transparent;
color: #71717a;
font-size: 22px;
line-height: 1;
cursor: pointer;
user-select: none;
transition: background 0.2s, color 0.2s;
}
.pip-setting-dismiss:hover {
background: #f4f4f5;
color: #18181b;
}
.pip-setting-item {
margin-bottom: 18px;
display: flex;
align-items: center;
font-size: 14px;
}
.pip-setting-item.item-vertical {
margin-bottom: 20px;
flex-direction: column;
align-items: flex-start;
}
.item-label-row {
width: 100%;
display: flex;
align-items: center;
}
.pip-setting-item span:first-child {
width: 100px;
color: #3f3f46;
font-weight: 600;
}
.pip-setting-item input[type="range"] {
flex: 1;
margin: 0 14px;
-webkit-appearance: none;
background: #d4d4d8;
height: 4px;
border-radius: 2px;
outline: none;
}
.pip-setting-item input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 12px;
height: 12px;
border-radius: 50%;
background: #ff5d23;
cursor: pointer;
transition: transform 0.1s;
}
.pip-setting-item input[type="range"]::-webkit-slider-thumb:hover {
transform: scale(1.2);
}
.pip-setting-item select {
flex: 1;
background: #f4f4f5;
color: #18181b;
padding: 6px 10px;
border-radius: 6px;
border: 1px solid #cdcdd6;
outline: none;
font-size: 14px;
cursor: pointer;
transition: border-color 0.2s, background 0.2s;
font-weight: 500;
}
.pip-setting-item select:focus {
border-color: #ff5d23;
background: #ffffff;
}
.pip-setting-item span:last-child {
width: 32px;
text-align: right;
color: #ff5d23;
font-weight: bold;
font-family: monospace;
}
.pip-setting-tip {
font-size: 11px;
color: #52525b;
margin-top: 6px;
margin-left: 100px;
line-height: 1.4;
}
`,document.head.appendChild(i)),document.body.appendChild(e);var i=Math.max(8,(window.innerWidth-e.offsetWidth)/2),a=Math.max(8,(window.innerHeight-e.offsetHeight)/2);e.style.left=i+"px",e.style.top=a+"px",PictureInPictureControl_initSettingPanelDrag(e);let r=document.getElementById("pip-fontsize"),l=document.getElementById("pip-trackheight"),s=document.getElementById("pip-speed"),c=document.getElementById("pip-area"),d=document.getElementById("pip-mergemode"),u=document.getElementById("pip-lowpowermode"),p=document.getElementById("pip-filterrobot"),m=document.getElementById("pip-tabswitch"),g=document.getElementById("pip-opacity");c.value=pipConfig.area,d.value=pipConfig.mergeMode||"combo",u.value=!0===pipConfig.lowPowerMode?"on":"off",p.value=!1!==pipConfig.filterRobotDanmaku?"on":"off",m.value=isTabSwitchEnabled()?"on":"off",r.addEventListener("input",()=>{pipConfig.fontSize=parseInt(r.value),document.getElementById("pip-fontsize-value").innerText=pipConfig.fontSize,n()}),l.addEventListener("input",()=>{pipConfig.trackHeight=parseInt(l.value),document.getElementById("pip-trackheight-value").innerText=pipConfig.trackHeight,n()}),s.addEventListener("input",()=>{pipConfig.speed=parseFloat(s.value),document.getElementById("pip-speed-value").innerText=pipConfig.speed,n()}),g.addEventListener("input",()=>{pipConfig.opacity=parseInt(g.value,10)/100,document.getElementById("pip-opacity-value").innerText=g.value+"%",n(),window.__pip_is_active__&&PictureInPictureControl_applyDanmakuStyle()}),c.addEventListener("change",()=>{pipConfig.area=c.value,n()}),d.addEventListener("change",()=>{pipConfig.mergeMode=d.value,n()}),p.addEventListener("change",()=>{pipConfig.filterRobotDanmaku="on"===p.value,n()}),u.addEventListener("change",()=>{pipConfig.lowPowerMode="on"===u.value,n(),window.__pip_is_active__&&PictureInPictureControl_toggleSourcePagePower(pipConfig.lowPowerMode)}),m.addEventListener("change",()=>{var e,t,n,o="on"===m.value;setTabSwitchEnabled(o),o?enableTabSwitch():showMessage("已关闭页签防冻结,请刷新页面后完全生效","info"),window.__pip_is_active__&&(t=(e=window.__pip_window__)?.document.getElementById("pip-video"),n=e?.__pip_source_video__,o?PictureInPictureControl_startTabAntiFreeze(n,e,t):PictureInPictureControl_stopTabAntiFreeze())}),e.querySelector(".pip-setting-reset").addEventListener("click",()=>{confirm("确定要将画中画设置恢复为默认配置吗?")&&(Object.assign(pipConfig,t),n(),o(),window.__pip_is_active__)&&(PictureInPictureControl_toggleSourcePagePower(pipConfig.lowPowerMode),PictureInPictureControl_applyDanmakuStyle(),PictureInPictureControl_updateDanmakuToggleBtn())}),e.querySelector(".pip-setting-dismiss").addEventListener("click",()=>{e.style.display="none"})}function PictureInPictureControl_initSettingPanelDrag(c){var e=c.querySelector(".pip-setting-header");if(e){let n=!1,o,i,a,r,l=e=>{var t;n&&(t=e.clientX-o,e=e.clientY-i,c.style.left=Math.max(0,a+t)+"px",c.style.top=Math.max(0,r+e)+"px")},s=()=>{n=!1,document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)};e.addEventListener("mousedown",e=>{var t;0!==e.button||e.target.closest(".pip-setting-dismiss, .pip-setting-reset")||(n=!0,t=c.getBoundingClientRect(),c.style.left=t.left+"px",c.style.top=t.top+"px",o=e.clientX,i=e.clientY,a=t.left,r=t.top,document.addEventListener("mousemove",l),document.addEventListener("mouseup",s),e.preventDefault())})}}function PictureInPictureControl_getTemplate(){return`
${PIP_BTN_SVG_RELOAD}
${icon_pipcontrol_set}
${icon_pipcontrol_send}
`}let currentBrightness="",currentContrast="",currentSaturate="",liveVideoParentClassName="",isMirror=!1,rotateAngle=0,isEnhanceQuality=!1,transformCss={rotateY:"",rotate:"",scale:""},panorama=null;function isEdgeBrowser(){return/Edg/i.test(navigator.userAgent)}function initPkg_VideoTools_Filter(){liveVideoParentClassName=liveVideoNode.parentNode.className,initPkg_VideoTools_Filter_Dom(),initPkg_VideoTools_Filter_Func()}function initPkg_VideoTools_Filter_Dom(){Filter_insertPanel(),isEdgeBrowser()&&Filter_insertEnhanceModal()}function Filter_getPanelHtml(){return`
${isEdgeBrowser()?`
`:""}
滤镜
`}function Filter_insertPanel(){var e,t="function"==typeof VideoToolbarMenu_getFilterHost?VideoToolbarMenu_getFilterHost():null;t&&((e=document.createElement("div")).innerHTML=Filter_getPanelHtml(),t.appendChild(e.firstElementChild),t=document.getElementsByClassName("menu-da2a9e")[0])&&((e=document.createElement("li")).id="filter__panorama",e.innerText="全景",t.insertBefore(e,t.childNodes[1]),(e=document.createElement("li")).id="filter__mirror",e.innerText="镜像画面",t.insertBefore(e,t.childNodes[1]),(e=document.createElement("li")).id="filter__rotate",e.innerText="旋转画面",t.insertBefore(e,t.childNodes[1]),(e=document.createElement("li")).id="filter__reset",e.innerText="重置",t.insertBefore(e,t.childNodes[1]),(e=document.createElement("div")).className="divider-f9d33d",t.insertBefore(e,t.childNodes[1]))}function Filter_insertEnhanceModal(){let e=document.createElement("div");e.className="enhance-modal__panel-wrap",e.innerHTML=`
×
开启后,弹幕飘屏会被遮挡,请将鼠标移入到直播画面中并点击
完成后,再
刷新以恢复弹幕飘屏,该功能会
自动保存
没有增强图标?
`;var t=document.querySelector("body")||document.body,t=(t&&t.insertBefore(e,t.childNodes[0]),e.getElementsByClassName("enhance-modal__close")[0]);t&&t.addEventListener("click",()=>{e.style.display="none"})}function initPkg_VideoTools_Filter_Func(){isEdgeBrowser()&&(e=document.getElementById("switch__enhance"))&&e.addEventListener("click",()=>{isEnhanceQuality=!isEnhanceQuality;var e=document.getElementById("switch__enhance"),t=document.getElementById("slider__enhance"),n=document.getElementsByClassName("enhance-modal__panel-wrap")[0],o=document.querySelector("video");isEnhanceQuality?(t.style.left="20px",e.style.background="#369",liveVideoNode.style.imageRendering="crisp-edges",liveVideoNode.style.imageRendering="-webkit-optimize-contrast",liveVideoNode.style.imageRendering="optimize-contrast",n.style.display="flex",o.style.zIndex="10",o.style.cursor="auto"):(t.style.left="0px",e.style.background="#ccc",liveVideoNode.style.imageRendering="",n.style.display="none",o.style.zIndex="0")}),setScrollFunc(document.getElementById("scroll__bright"),document.getElementById("bar__bright"),document.getElementById("mask__bright"),e=>{currentBrightness=`brightness(${e}%)`,liveVideoNode.style.filter=`${currentBrightness} ${currentContrast} `+currentSaturate}),setScrollFunc(document.getElementById("scroll__contrast"),document.getElementById("bar__contrast"),document.getElementById("mask__contrast"),e=>{currentContrast=`contrast(${e}%)`,liveVideoNode.style.filter=`${currentBrightness} ${currentContrast} `+currentSaturate}),setScrollFunc(document.getElementById("scroll__saturate"),document.getElementById("bar__saturate"),document.getElementById("mask__saturate"),e=>{currentSaturate=`saturate(${e}%)`,liveVideoNode.style.filter=`${currentBrightness} ${currentContrast} `+currentSaturate});var e=document.getElementById("filter__reset"),e=(e&&e.addEventListener("click",()=>{resetVideoFilter()}),document.getElementById("filter__reset2")),e=(e&&e.addEventListener("click",()=>{resetVideoFilter()}),document.getElementById("filter__mirror")),e=(e&&e.addEventListener("click",()=>{isMirror?(isMirror=!1,transformCss.rotateY="rotateY(0deg)"):(isMirror=!0,transformCss.rotateY="rotateY(180deg)"),liveVideoNode&&liveVideoNode.parentNode&&(liveVideoNode.parentNode.style.transition="all .5s",liveVideoNode.parentNode.style.transform=transformCss.rotateY+" "+transformCss.rotate+" "+transformCss.scale)}),document.getElementById("filter__rotate")),e=(e&&e.addEventListener("click",()=>{rotateAngle+=90,transformCss.rotate=`rotate(${String(rotateAngle)}deg)`,liveVideoNode&&liveVideoNode.parentNode&&(liveVideoNode.parentNode.style.transition="all .5s",rotateAngle/90%2!=0?window.innerWidth>window.innerHeight?transformCss.scale="scale("+String(liveVideoNode.videoHeight/(liveVideoNode.videoWidth||1))+")":transformCss.scale="scale("+String(liveVideoNode.videoWidth/(liveVideoNode.videoHeight||1))+")":transformCss.scale="",liveVideoNode.parentNode.style.transform=transformCss.rotateY+" "+transformCss.rotate+" "+transformCss.scale)}),document.getElementById("filter__select")),e=(e&&(e.onchange=function(){switch(this.options[this.selectedIndex].text){case"default":StyleHook_remove("Ex_Style_Filter");break;case"1977":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(110%)brightness(110%)saturate(130%);filter:contrast(110%)brightness(110%)saturate(130%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:screen;background:rgba(243,106,188,0.3);z-index:10}`);break;case"Aden":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(90%)brightness(120%)saturate(85%)hue-rotate(20deg);filter:contrast(90%)brightness(120%)saturate(85%)hue-rotate(20deg)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:darken;background:-webkit-linear-gradient(to right,rgba(66,10,14,0.2)1,rgba(66,10,14,0));background:linear-gradient(to right,rgba(66,10,14,0.2)1,rgba(66,10,14,0));z-index:10}`);break;case"Amaro":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(90%)brightness(110%)saturate(150%)hue-rotate(-10deg);filter:contrast(90%)brightness(110%)saturate(150%)hue-rotate(-10deg)}`);break;case"Brannan":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(140%)sepia(50%);filter:contrast(140%)sepia(50%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:lighten;background:rgba(161,44,199,0.31);z-index:10}`);break;case"Brooklyn":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(90%)brightness(110%);filter:contrast(90%)brightness(110%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:overlay;background:-webkit-radial-gradient(50%50%,circle closest-corner,rgba(168,223,193,0.4)1,rgba(183,196,200,0.2));background:radial-gradient(50%50%,circle closest-corner,rgba(168,223,193,0.4)1,rgba(183,196,200,0.2));z-index:10}`);break;case"Claredon":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(120%)saturate(125%);filter:contrast(120%)saturate(125%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:overlay;background:rgba(127,187,227,0.2);z-index:10}`);break;case"Earlybird":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(90%)sepia(20%);filter:contrast(90%)sepia(20%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:overlay;background:-webkit-radial-gradient(50%50%,circle closest-corner,rgba(208,186,142,1)20,rgba(29,2,16,0.2));background:radial-gradient(50%50%,circle closest-corner,rgba(208,186,142,1)20,rgba(29,2,16,0.2));z-index:10}`);break;case"Gingham":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:brightness(105%)hue-rotate(350deg);filter:brightness(105%)hue-rotate(350deg)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:darken;background:-webkit-linear-gradient(to right,rgba(66,10,14,0.2)1,rgba(0,0,0,0));background:linear-gradient(to right,rgba(66,10,14,0.2)1,rgba(0,0,0,0));z-index:10}`);break;case"Hudson":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(90%)brightness(120%)saturate(110%);filter:contrast(90%)brightness(120%)saturate(110%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:multiply;opacity:0.5;background:-webkit-radial-gradient(50%50%,circle closest-corner,rgba(255,177,166,1)50,rgba(52,33,52,1));background:radial-gradient(50%50%,circle closest-corner,rgba(255,177,166,1)50,rgba(52,33,52,1));z-index:10}`);break;case"Inkwell":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(110%)brightness(110%)sepia(30%)grayscale(100%);filter:contrast(110%)brightness(110%)sepia(30%)grayscale(100%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;background:rgba(0,0,0,0);z-index:10}`);break;case"Lofi":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(150%)saturate(110%);filter:contrast(150%)saturate(110%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:multiply;background:-webkit-radial-gradient(50%50%,circle closest-corner,rgba(0,0,0,0)70,rgba(34,34,34,1));background:radial-gradient(50%50%,circle closest-corner,rgba(0,0,0,0)70,rgba(34,34,34,1));z-index:10}`);break;case"Maven":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(95%)brightness(95%)saturate(150%)sepia(25%);filter:contrast(95%)brightness(95%)saturate(150%)sepia(25%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:hue;background:rgba(3,230,26,0.2);z-index:10}`);break;case"Perpetua":setVideoFilter(`.${liveVideoParentClassName}{position:relative}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:soft-light;opacity:0.5;background:-webkit-linear-gradient(to bottom,rgba(0,91,154,1)1,rgba(61,193,230,0));background:linear-gradient(to bottom,rgba(0,91,154,1)1,rgba(61,193,230,0));z-index:10}`);break;case"Reyes":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(85%)brightness(110%)saturate(75%)sepia(22%);filter:contrast(85%)brightness(110%)saturate(75%)sepia(22%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:soft-light;opacity:0.5;background:rgba(173,205,239,1);z-index:10}`);break;case"Stinson":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(75%)brightness(115%)saturate(85%);filter:contrast(75%)brightness(115%)saturate(85%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:soft-light;background:rgba(240,149,128,0.2);z-index:10}`);break;case"Toaster":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(150%)brightness(90%);filter:contrast(150%)brightness(90%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:screen;opacity:0.5;background:-webkit-radial-gradient(50%50%,circle closest-corner,rgba(15,78,128,1)1,rgba(59,0,59,1));background:radial-gradient(50%50%,circle closest-corner,rgba(15,78,128,1)1,rgba(59,0,59,1));z-index:10}`);break;case"Walden":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:brightness(110%)saturate(160%)sepia(30%)hue-rotate(350deg);filter:brightness(110%)saturate(160%)sepia(30%)hue-rotate(350deg)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:screen;opacity:0.3;background:rgba(204,68,0,1);z-index:10}`);break;case"Valencia":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:contrast(108%)brightness(108%)sepia(8%);filter:contrast(108%)brightness(108%)sepia(8%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:exclusion;opacity:0.5;background:rgba(58,3,57,1);z-index:10}`);break;case"Xpro2":setVideoFilter(`.${liveVideoParentClassName}{position:relative;-webkit-filter:sepia(30%);filter:sepia(30%)}.${liveVideoParentClassName}::before{content:"";display:block;height:100%;width:100%;top:0;left:0;position:absolute;pointer-events:none;mix-blend-mode:color-burn;background:-webkit-radial-gradient(50%50%,circle closest-corner,rgba(224,231,230,1)40,rgba(43,42,161,0.6));background:radial-gradient(50%50%,circle closest-corner,rgba(224,231,230,1)40,rgba(43,42,161,0.6));z-index:10}`);break;default:StyleHook_remove("Ex_Style_Filter")}}),document.getElementById("filter__panorama"));e&&e.addEventListener("click",()=>{var e,t=document.getElementById("ex-panorama");t?(t.remove(),panorama=null):(t=document.getElementById("__h5player"))&&((e=document.createElement("div")).id="ex-panorama",e.style="width:100%;height:100%;z-index:1;background:black;",t.insertBefore(e,t.childNodes[0]),panoramaAnimation(panorama=new PanoramaVideo(e,liveVideoNode)))})}function Filter_showPanel(){var e=document.querySelector("#ex-vtoolbar-filter-host .filter__wrap");e&&(e.style.display="block")}function Filter_hidePanel(){var e=document.querySelector("#ex-vtoolbar-filter-host .filter__wrap");e&&(e.style.display="none")}function resetVideoFilter(){StyleHook_remove("Ex_Style_Filter"),document.getElementById("filter__select").selectedIndex=0,liveVideoNode.style.filter="",rotateAngle=0,transformCss={rotateY:"",rotate:"",scale:""},liveVideoNode.parentNode.style.transform="",document.getElementById("bar__bright").style.left="100px",document.getElementById("bar__contrast").style.left="100px",document.getElementById("bar__saturate").style.left="100px",document.getElementById("mask__bright").style.width="100px",document.getElementById("mask__contrast").style.width="100px",document.getElementById("mask__saturate").style.width="100px",isEdgeBrowser()&&(isEnhanceQuality=!1,t=document.getElementById("slider__enhance"),e=document.getElementById("switch__enhance"),t&&(t.style.left="0px"),e&&(e.style.background="#ccc"),liveVideoNode.style.imageRendering="",t=document.getElementsByClassName("enhance-modal__panel-wrap")[0])&&(t.style.display="none");var e=document.getElementById("ex-panorama"),t=(e&&(e.remove(),panorama=null),document.getElementsByClassName("layout-Player-videoEntity")[0]);t.style.transform="",t.style.transformOrigin="",videoScale=1,StyleHook_remove("Ex_Style_Cinema"),liveVideoNode.playbackRate=1}function panoramaAnimation(e){requestAnimationFrame(()=>{panoramaAnimation(e)}),e.update()}function setVideoFilter(e){StyleHook_remove("Ex_Style_Filter"),StyleHook_set("Ex_Style_Filter",e),Filter_hidePanel()}function setScrollFunc(e,t,n,s){if(e&&t&&n){let i=e,a=t,r=n,l=0;a.onmousedown=function(e){let t=(e||window.event).clientX-this.offsetLeft,n=this;function o(e){e=e||window.event;(l=e.clientX-t)<0?l=0:l>i.offsetWidth-a.offsetWidth&&(l=i.offsetWidth-a.offsetWidth),r.style.width=l+"px",n.style.left=l+"px",s(parseInt(l/(i.offsetWidth-a.offsetWidth)*255)),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}document.addEventListener("mousemove",o),document.addEventListener("mouseup",function e(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",e)})}}}function initPkg_VideoTools_VideoRecall(){initPkg_VideoTools_VideoRecall_Func()}var VideoRecall_keydownHandler=null,liveVideoNode;function initPkg_VideoTools_VideoRecall_Func(){VideoRecall_keydownHandler&&document.removeEventListener("keydown",VideoRecall_keydownHandler,!0),VideoRecall_keydownHandler=e=>{isInput||e.target&&(e.target.isContentEditable||/^(input|textarea)$/i.test(e.target.tagName))||37!=e.keyCode&&39!=e.keyCode&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(liveVideoNode=liveVideoNode||document.querySelector(".layout-Player-videoEntity video"))&&(e.preventDefault(),liveVideoNode.currentTime=Math.max(0,(liveVideoNode.currentTime||0)+(37==e.keyCode||"ArrowLeft"===e.key?-3:3)))},document.addEventListener("keydown",VideoRecall_keydownHandler,!0)}function initPkg_VideoTools_VideoSpeed(){initPkg_VideoTools_VideoSpeed_Dom(),initPkg_VideoTools_VideoSpeed_Func()}function initPkg_VideoTools_VideoSpeed_Dom(){VideoSpeed_insertIcon()}function VideoSpeed_insertIcon(){var e=document.createElement("li"),t=(e.id="ex-videospeed",e.innerHTML=`
倍速播放
- 2.0x
- 1.5x
- 1.25x
- 1.0x
- 0.75x
- 0.5x
`,document.getElementsByClassName("menu-da2a9e")[0]);t&&t.insertBefore(e,t.childNodes[1])}function initPkg_VideoTools_VideoSpeed_Func(){[{id:"videospeed__2.0",rate:2},{id:"videospeed__1.5",rate:1.5},{id:"videospeed__1.25",rate:1.25},{id:"videospeed__1.0",rate:1},{id:"videospeed__0.75",rate:.75},{id:"videospeed__0.5",rate:.5}].forEach(e=>{var t=document.getElementById(e.id);t&&t.addEventListener("click",()=>{void 0!==liveVideoNode&&liveVideoNode&&(liveVideoNode.playbackRate=e.rate)})})}function initPkg_VideoTools_VideoSync(){initPkg_VideoTools_VideoSync_Dom(),initPkg_VideoTools_VideoSync_Func()}function initPkg_VideoTools_VideoSync_Dom(){VideoSync_insertIcon()}function VideoSync_insertIcon(){var e=document.createElement("div");e.id="ex-videosync",e.title="同步时间",e.innerHTML=`
`;let t=document.getElementsByClassName("left-d3671e")[0];t?(e.style.marginLeft="20px",t.insertBefore(e,t.childNodes[3]||t.firstChild)):(e.style.marginLeft="8px",(t=getValidDom([".left-bfab3b"]))&&t.insertBefore(e,t.childNodes[2]||t.firstChild))}function initPkg_VideoTools_VideoSync_Func(){var e=document.getElementById("ex-videosync");e&&e.addEventListener("click",()=>{setVideoSync()})}function setVideoSync(){var e=liveVideoNode.buffered;0!=e.length&&(liveVideoNode.currentTime=e.end(0))}let VideoToolbarMenu_isOpen=!1,VideoToolbarMenu_filterExpanded=!1,VideoToolbarMenu_closeTimer=null;function initPkg_VideoTools_VideoToolbarMenu(){VideoToolbarMenu_insertDom(),VideoToolbarMenu_bindEvents()}function VideoToolbarMenu_insertDom(){var e=document.createElement("div"),t=(e.id="ex-vtoolbar-menu",e.className="vtoolbar-menu",e.innerHTML=`
`,getValidDom([".right-e7ea5d",".right-17e251"]));t&&t.insertBefore(e,t.childNodes[0])}function VideoToolbarMenu_getRoot(){return document.getElementById("ex-vtoolbar-menu")}function VideoToolbarMenu_isInsideMenu(e){var t=VideoToolbarMenu_getRoot();return t&&e&&t.contains(e)}function VideoToolbarMenu_onTriggerEnter(){clearTimeout(VideoToolbarMenu_closeTimer),VideoToolbarMenu_open()}function VideoToolbarMenu_onMenuZoneEnter(){clearTimeout(VideoToolbarMenu_closeTimer),VideoToolbarMenu_isOpen||VideoToolbarMenu_open()}function VideoToolbarMenu_scheduleClose(){clearTimeout(VideoToolbarMenu_closeTimer),VideoToolbarMenu_closeTimer=setTimeout(()=>{VideoToolbarMenu_close()},80)}function VideoToolbarMenu_onMenuZoneLeave(e){VideoToolbarMenu_isInsideMenu(e.relatedTarget)||VideoToolbarMenu_scheduleClose()}function VideoToolbarMenu_bindHoverTarget(e,t){e&&(t?(e.addEventListener("mouseenter",VideoToolbarMenu_onTriggerEnter),e.addEventListener("pointerenter",VideoToolbarMenu_onTriggerEnter)):(e.addEventListener("mouseenter",VideoToolbarMenu_onMenuZoneEnter),e.addEventListener("pointerenter",VideoToolbarMenu_onMenuZoneEnter)),e.addEventListener("mouseleave",VideoToolbarMenu_onMenuZoneLeave),e.addEventListener("pointerleave",VideoToolbarMenu_onMenuZoneLeave))}function VideoToolbarMenu_bindEvents(){var e=VideoToolbarMenu_getRoot(),t=e.querySelector(".vtoolbar-menu__trigger"),e=e.querySelector(".vtoolbar-menu__dropdown"),n=document.getElementById("ex-vtoolbar-filter-host"),o=document.getElementById("vtoolbar-menu-filter"),i=document.getElementById("vtoolbar-menu-copy-live"),a=document.getElementById("vtoolbar-menu-enhanced-pip"),r=document.getElementById("vtoolbar-menu-expanel");VideoToolbarMenu_bindHoverTarget(t,!0),VideoToolbarMenu_bindHoverTarget(e,!1),VideoToolbarMenu_bindHoverTarget(n,!1),o.addEventListener("click",e=>{e.stopPropagation(),VideoToolbarMenu_toggleFilterPanel()}),i.addEventListener("click",e=>{e.stopPropagation(),"function"==typeof CopyRealLive_copySelected&&CopyRealLive_copySelected()}),a.addEventListener("click",e=>{e.stopPropagation(),VideoToolbarMenu_close(),"function"==typeof PictureInPictureControl_launchEnhanced&&PictureInPictureControl_launchEnhanced()}),r.addEventListener("click",e=>{e.stopPropagation(),"function"==typeof showExPanel&&showExPanel()}),document.addEventListener("keydown",VideoToolbarMenu_onKeydown)}function VideoToolbarMenu_onKeydown(e){"Escape"===e.key&&(VideoToolbarMenu_close(),VideoToolbarMenu_hideFilterPanel())}function VideoToolbarMenu_open(){var e=document.getElementById("ex-vtoolbar-menu");e&&(VideoToolbarMenu_isOpen=!0,e.classList.add("is-open"),e.querySelector(".vtoolbar-menu__trigger").setAttribute("aria-expanded","true"))}function VideoToolbarMenu_close(){var e=document.getElementById("ex-vtoolbar-menu");e&&(clearTimeout(VideoToolbarMenu_closeTimer),VideoToolbarMenu_isOpen=!1,e.classList.remove("is-open"),e.querySelector(".vtoolbar-menu__trigger").setAttribute("aria-expanded","false"),VideoToolbarMenu_hideFilterPanel())}function VideoToolbarMenu_toggleFilterPanel(){(VideoToolbarMenu_filterExpanded?VideoToolbarMenu_hideFilterPanel:VideoToolbarMenu_showFilterPanel)()}function VideoToolbarMenu_showFilterPanel(){var e=document.getElementById("ex-vtoolbar-filter-host"),t=document.getElementById("vtoolbar-menu-filter");e&&(VideoToolbarMenu_filterExpanded=!0,e.classList.add("is-visible"),t&&(t.classList.add("is-active"),t.setAttribute("aria-expanded","true")),"function"==typeof Filter_showPanel)&&Filter_showPanel()}function VideoToolbarMenu_hideFilterPanel(){var e=document.getElementById("ex-vtoolbar-filter-host"),t=document.getElementById("vtoolbar-menu-filter");VideoToolbarMenu_filterExpanded=!1,e&&e.classList.remove("is-visible"),t&&(t.classList.remove("is-active"),t.setAttribute("aria-expanded","false")),"function"==typeof Filter_hidePanel&&Filter_hidePanel()}function VideoToolbarMenu_getFilterHost(){return document.getElementById("ex-vtoolbar-filter-host")}let VideoToolbarMenu_pokeballSvg=PokeballIcon_svg,VideoToolbarMenu_iconFilter='',VideoToolbarMenu_iconChevron='',VideoToolbarMenu_iconCopyLive='',VideoToolbarMenu_iconEnhancedPip='';var isInput=!1;let videotools_num=0;function initPkg_VideoTools(){let t=setInterval(()=>{var e;getValidDom([".right-e7ea5d",".right-17e251"])&&(clearInterval(t),liveVideoNode=document.querySelector(".layout-Player-videoEntity video"),(e=document.getElementsByClassName("disable-23f484")[0])?e.innerHTML="DouyuEx_"+curVersion:ExGuard_warn("视频工具","未找到版本水印节点(.disable-23f484),版本号未写入(其余功能不受影响)"),initPkg_VideoTools_Module(),initPkg_VideoTools_Func()),100<=++videotools_num&&clearInterval(t)},1500)}function initPkg_VideoTools_Module(){initPkg_VideoTools_VideoToolbarMenu(),initPkg_VideoTools_Joysound(),initPkg_VideoTools_VideoSpeed(),initPkg_VideoTools_Cinema(),initPkg_VideoTools_VideoSync(),initPkg_VideoTools_VideoRecall(),initPkg_VideoTools_Filter(),initPkg_VideoTools_Camera(),initPkg_VideoTools_VideoZoom(),initPkg_VideoTools_MetaData(),initPkg_PictureInPictureControl()}function initPkg_VideoTools_Func(){var e=()=>{"function"==typeof VideoToolbarMenu_hideFilterPanel?VideoToolbarMenu_hideFilterPanel():"function"==typeof Filter_hidePanel&&Filter_hidePanel()},t=document.getElementById("js-player-toolbar"),t=(t&&t.addEventListener("mouseover",e),document.getElementById("js-player-asideMain")),t=(t&&t.addEventListener("mouseover",e),getValidDom([".inputView-2a65aa",".inputView-620ab7"]));t&&(t.addEventListener("focus",()=>{isInput=!0}),t.addEventListener("blur",()=>{isInput=!1})),new DomHook(".app-f0f9c7",!1,e=>{0{if(t.ctrlKey&&(a=a||getValidDom([".layout-Player-videoEntity",".layout-Player-video"]),r=r||document.getElementsByClassName("layout-Player-videoEntity")[0],a)&&r){var n=a.getBoundingClientRect();if(!(t.clientXn.right||t.clientYn.bottom)){t.preventDefault(),t.stopImmediatePropagation();var o=t.clientX-n.left,n=t.clientY-n.top;let e=videoScale+(t.deltaY<0?.1:-.1);e<.1&&(e=.1);var t=(o-l)/videoScale,i=(n-s)/videoScale;l=o-t*e,s=n-i*e,(videoScale=e)<.1&&(videoScale=.1),r.style.transform=`translate(${l}px, ${s}px) scale(${videoScale})`}}},window.addEventListener("wheel",VideoZoom_wheelHandler,{capture:!0,passive:!1}),VideoZoom_moveHandler&&window.removeEventListener("mousemove",VideoZoom_moveHandler,!0),VideoZoom_upHandler&&window.removeEventListener("mouseup",VideoZoom_upHandler,!0),window.addEventListener("mousedown",e=>{var t;e.ctrlKey&&0===e.button&&(t=a.getBoundingClientRect(),e.clientXt.right||e.clientYt.bottom||(e.preventDefault(),r.style.transition="none",VideoZoom_drag={x:e.clientX,y:e.clientY,tx:l,ty:s}))},!0),VideoZoom_moveHandler=e=>{VideoZoom_drag&&(l=VideoZoom_drag.tx+(e.clientX-VideoZoom_drag.x),s=VideoZoom_drag.ty+(e.clientY-VideoZoom_drag.y),r.style.transform=`translate(${l}px, ${s}px) scale(${videoScale})`)},VideoZoom_upHandler=()=>{VideoZoom_drag&&(VideoZoom_drag=null,r.style.transition="transform 0.1s")},window.addEventListener("mousemove",VideoZoom_moveHandler,!0),window.addEventListener("mouseup",VideoZoom_upHandler,!0))}function initPkg_VolumeMouseScrolling(){let t=setInterval(()=>{var e=document.querySelector(".volume-07c230");let n=document.getElementById("__video2");e&&n&&(clearInterval(t),e.addEventListener("wheel",function(e){e.preventDefault(),e.stopPropagation();var t=n.volume;VolumeMouseScrolling_Handler(e.deltaY<0?Math.min(t+.05,1):Math.max(t-.05,0))},{passive:!1,capture:!0}),n.addEventListener("volumechange",()=>{VolumeMouseScrolling_SyncVolumeUI(n.volume)}),VolumeMouseScrolling_SyncVolumeUI(n.volume))},500)}function VolumeMouseScrolling_SyncVolumeUI(e){try{var t=document.querySelector(".volume-07c230"),n=document.querySelector(".volume-bar-93f0b0 .front-99e2aa"),o=document.querySelector(".volume-bar-93f0b0 .point-6ef744"),i=document.querySelector(".volume-bar-93f0b0 .tips2-9bb064");n&&(n.style.height=100*e+"px"),o&&(o.style.bottom=100*e+7+"px"),i&&(i.textContent=`音量${Math.round(100*e)}%`),t&&(0===e?(t.classList.add("custom-muted"),t.classList.remove("custom-normal")):(t.classList.add("custom-normal"),t.classList.remove("custom-muted")))}catch(e){}}let _volumeSaveTimer=null;function VolumeMouseScrolling_Handler(n){var e=document.getElementById("__video2");e&&(e.muted=0===n,e.volume=n,clearTimeout(_volumeSaveTimer),_volumeSaveTimer=setTimeout(()=>{try{["volume_muted_before_key","player_storage_volume_h5p_room"].forEach(e=>{var t=localStorage.getItem(e);t&&((t=JSON.parse(t)).v=n,localStorage.setItem(e,JSON.stringify(t)))})}catch(e){}},300))}function doSign(e){new Promise(t=>{fetch("https://www.douyu.com/japi/carnival/nc/hostSnowSign/doSign",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`actAlias=${e}&token=${dyToken}&ctn=`+getCCN()}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{console.log("请求失败!",e)})})}function signAct(e){new Promise(t=>{fetch("https://www.douyu.com/japi/carnival/nc/signAct/signIn",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"token="+dyToken+"&signAlias="+e}).then(e=>e.json()).then(e=>{t(e)})})}function userStatus(e){new Promise(t=>{fetch("https://www.douyu.com/japi/carnival/nc/actTask/userStatus",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`tasks=${e}&token=`+dyToken}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{console.log("请求失败!",e)})})}function takeActPrize(e){new Promise(t=>{fetch("https://www.douyu.com/japi/carnival/nc/actTask/takePrize",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`token=${dyToken}&aid=android&taskAlias=`+e}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{console.log("请求失败!",e)})})}function addFollowRoom(e){new Promise(t=>{fetch("https://www.douyu.com/wgapi/livenc/liveweb/follow/add",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`rid=${e}&ctn=`+getCCN()}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{console.log("请求失败!",e)})})}function removeFollowRoom(e){new Promise(t=>{fetch("https://www.douyu.com/wgapi/livenc/liveweb/follow/rm",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`rid=${e}&ctn=`+getCCN()}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{console.log("请求失败!",e)})})}function shareAct(e){new Promise(t=>{fetch("https://www.douyu.com/japi/carnival/common/share",{method:"POST",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`actAlias=${e}&token=`+dyToken}).then(e=>e.json()).then(e=>{t(e)}).catch(e=>{console.log("请求失败!",e)})})}function getJackpot(e){new Promise(t=>{fetch("https://www.douyu.com/japi/carnival/nc/lottery/jackpot",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},body:`{"activityId":"${e}","token":"${dyToken}"}`}).then(e=>e.json()).then(e=>{t(e)})})}function getActRemaining(e){new Promise(t=>{fetch("https://www.douyu.com/japi/carnival/nc/lottery/remaining?activityId="+e,{method:"GET",mode:"no-cors",credentials:"include",headers:{"Content-Type":"application/json;charset=UTF-8"}}).then(e=>e.json()).then(e=>{t(e)})})}function getActList(){}class ASS{constructor(e){var t={width:1920,height:1080,fontSize:36,alpha:this._prefixInteger(Number(0).toString(16),2),stayTime:10,title:"Default"};this.options={...t,...e,...e&&e.alpha?this._prefixInteger(this.options.alpha.toString(16),2):{}},this.lines=20,this.lineBase=this.options.height/this.lines,this.currentLine=0,this.diffTime=1500}generate(e){var t=e.sort((e,t)=>e.time-t.time);let n=this._getScriptInfo()+this._getV4Styles()+this._getEvents();for(let e=0;e=this.lines&&(this.currentLine=0);var o=t[e],i=Number(o.time)+1e3*Number(this.options.stayTime),a=this.lineBase*this.currentLine+this.options.fontSize,r=this.options.fontSize*o.txt.length;n+=`Dialogue: 0,${formatSeconds2(Number(o.time)/1e3)}.00,${formatSeconds2(i/1e3)}.00,Color${o.color},,0,0,0,,{\\move(${this.options.width+r},${a},${-r},${a})}${o.txt}
`}return n}_prefixInteger(e,t){return e=""+e,Array(t+1-e.length).join("0")+e}_getScriptInfo(){return`[Script Info]
; DouyuEx -By qianjiachun
; https://github.com/qianjiachun/douyuEx
ScriptType: v4.00+
Title: ${this.options.title}
PlayResX: ${this.options.width}
PlayResY: ${this.options.height}
`}_getV4Styles(){return`
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Color0,黑体,${this.options.fontSize},&H${this.options.alpha}FFFFFF,&H80000000,&H80000000,&H80000000,0,0,0,0,100,100,0,0,0,0,0,0,0,0,0,134
Style: Color7,黑体,${this.options.fontSize},&H${this.options.alpha}5456FF,&H80000000,&H80000000,&H80000000,0,0,0,0,100,100,0,0,0,0,0,0,0,0,0,134
Style: Color8,黑体,${this.options.fontSize},&H${this.options.alpha}2375FF,&H80000000,&H80000000,&H80000000,0,0,0,0,100,100,0,0,0,0,0,0,0,0,0,134
Style: Color9,黑体,${this.options.fontSize},&H${this.options.alpha}B369FE,&H80000000,&H80000000,&H80000000,0,0,0,0,100,100,0,0,0,0,0,0,0,0,0,134
Style: Color10,黑体,${this.options.fontSize},&H${this.options.alpha}00BCFF,&H80000000,&H80000000,&H80000000,0,0,0,0,100,100,0,0,0,0,0,0,0,0,0,134
Style: Color11,黑体,${this.options.fontSize},&H${this.options.alpha}46C978,&H80000000,&H80000000,&H80000000,0,0,0,0,100,100,0,0,0,0,0,0,0,0,0,134
Style: Color12,黑体,${this.options.fontSize},&H${this.options.alpha}FF7F9E,&H80000000,&H80000000,&H80000000,0,0,0,0,100,100,0,0,0,0,0,0,0,0,0,134
Style: Color13,黑体,${this.options.fontSize},&H${this.options.alpha}FF9B3D,&H80000000,&H80000000,&H80000000,0,0,0,0,100,100,0,0,0,0,0,0,0,0,0,134
`}_getEvents(){return`
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
`}}class CClick{constructor(e){this.func_click=null,this.func_dbClick=null,this.func_longClick=null;let t=!1,n=null,o=0,i=null;e.addEventListener("mousedown",e=>{0===e.button&&(t=!1,n=setTimeout(()=>{t=!0,null!==this.func_longClick&&this.func_longClick(e)},700))}),e.addEventListener("mouseup",e=>{0===e.button&&(clearTimeout(n),t?t=!1:null===this.func_dbClick?null!==this.func_click&&this.func_click(e):2<=++o?(clearTimeout(i),o=0,this.func_dbClick(e)):i=setTimeout(()=>{o=0,null!==this.func_click&&this.func_click(e)},250))})}click(e){this.func_click=e}dbClick(e){this.func_dbClick=e}longClick(e){this.func_longClick=e}}class DomHook{constructor(e,t,n){this.selector=e,this.isSubtree=t,this.callback=n,this.observer=null,this.targetNode=null,this.failed=!1,this.failReason="",this.callbackErrors=0,this.closed=!1;let o=null;try{o=document.querySelector(this.selector)}catch(e){o=null,ExGuard_warn("DomHook","选择器 "+this.selector+" 查询失败",e)}if(null==o)this.failed=!0,this.failReason="target-not-found",ExGuard_warn("DomHook","目标 "+this.selector+" 不存在,本次没有挂上(等下次初始化或刷新后重试)");else try{let t=this;this.observer=new MutationObserver(function(e){try{n(e)}catch(e){t.callbackErrors++,t.callbackErrors<=3&&ExGuard_warn("DomHook","回调 "+t.selector+" 抛错(第 "+t.callbackErrors+" 次,observer 继续工作)",e)}}),this.observer.observe(o,{attributes:!0,childList:!0,subtree:this.isSubtree}),this.targetNode=o}catch(e){this.observer=null,this.failed=!0,this.failReason="observe-failed",ExGuard_warn("DomHook","目标 "+this.selector+" 挂载 observer 失败",e)}}isActive(){var e;return!(!this.observer||this.closed||!(e=this.targetNode))&&("boolean"==typeof e.isConnected?e.isConnected:!!e.parentNode)}closeHook(){this.observer&&(this.observer.disconnect(),this.observer=null),this.targetNode=null,this.closed=!0}}class DyVideoSign{constructor(e){this.pointId=e,this.decoder=new TextDecoder}getSign(){var e=parseInt((new Date).getTime()/1e3,10);return unsafeWindow[this.d539fa2cf7732d2a(256042,"9f4f419501570ad13334")](this.pointId,"10000000000000000000000000001501",e)}d539fa2cf7732d2a(e,t){for(var n=(e=CryptoJS.MM(e.toString()).toString())[0].charCodeAt(0),o=e[16].charCodeAt(0),i=[],a=0;a<4;a++)i[a]=n<<24|n<<16|n<<8|n,i[a+4]=o<<24|o<<16|o<<8|o;for(var e=Math.floor(t.length/16)%4,r=[],l=t.length%8,s=Math.floor(t.length/8),a=0;a>>8|parseInt(t.substr(8*a+6,2),16)<<24;var c=0==e?e86500e2(r,i):1==e?this.c30070a4(r,i):d831eb20(r,i),d=[];for(a=0;a>>8&255,m=c[a]>>>16&255,g=c[a]>>>24&255;u&&d.push(u),p&&d.push(p),m&&d.push(m),g&&d.push(g)}var f=Math.floor(l/2);for(a=0;a>>5)+i^r+n[r>>>11&3])<<4^a>>>5)+a^(r-=2654435769)+n[3&r];e[o]=i,e[o+1]=a}return e}}class DyWacthAd{constructor(e,t,n){this.posid=e,this.token=t,this.rid=n,this._uid=String(t).split("_")[0],this._mid=0,this._infoBack=""}async start(){var e=await this.getInfo(this.posid,this.token,this.rid);return 0!=e&&(this._mid=e.mid,this._infoBack=e.infoBack,await this.getStart(this.posid,this.token,this._uid,this._mid,this._infoBack))}async finish(){return await this.getFinish(this.posid,this.token,this._uid,this._mid,this._infoBack)}getInfo(e,t,o){return new Promise(n=>{GM_xmlhttpRequest({method:"POST",url:"https://rtbapi.douyucdn.cn/japi/sign/app/getinfo?token="+t+"&mdid=phone&client_sys=android",data:"posid="+e+"&roomid="+o+'&cate1=1&cate2=1&chanid=30&device={"nt":"1"}',responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},onload:function(e){var t,e=e.response;"0"==e.error&&(0==e.data.length?n(!1):(t=e.data[0].mid,e=encodeURIComponent(JSON.stringify(e.data)),n({mid:t,infoBack:e})))}})})}getStart(e,n,o,i,a){return new Promise(t=>{GM_xmlhttpRequest({method:"POST",url:"https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/start?client_sys=android",data:"&uid="+o+"&roomId="+rid+"&posCode="+e+"&token="+n+"&clientType=1&creativeId="+i+"&infoBack="+a,responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},onload:function(e){"0"==e.response.error&&t(!0)}})})}getFinish(e,n,o,i,a){return new Promise(t=>{GM_xmlhttpRequest({method:"POST",url:"https://apiv2.douyucdn.cn/japi/inspire/api/ad/fishpond/mobile/finish?client_sys=android",data:"uid="+o+"&clientType=1&posCode="+e+"&creativeId="+i+"&roomId="+rid+"&token="+n+"&infoBack="+a,responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},onload:function(e){e=e.response;"0"==e.error&&"1"==e.data?t(!0):t(!1)}})})}}var EXGUARD_WARN_MAX=20;function ExGuard_warnCountsSafe(){return ExGuard_warnCountsSafe.map||(ExGuard_warnCountsSafe.map={}),ExGuard_warnCountsSafe.map}function ExGuard_warn(t,n,o){var t=String(t||"杂项"),i=ExGuard_warnCountsSafe(),a=i[t]||0;if(!(EXGUARD_WARN_MAX<=a)){i[t]=a+1;let e="";o&&(i=o&&o.message?o.message:String(o))&&(e=" —— "+i);try{console.warn("[DouyuEx] "+t+":"+n+e)}catch(e){}}}function ExGuard_warnCount(e){ExGuard_warnCountsSafe()[String(e||"杂项")]}function ExGuard_asList(e){return Array.isArray(e)?e:[]}function ExGuard_pollFor(n,o,e){function i(){c.timer&&(clearInterval(c.timer),c.timer=0)}let a=e||{},r=0=l){c.done=!0,i();var t=Math.round(r*l/1e3);if(a.quiet)try{"undefined"!=typeof console&&console.debug&&console.debug("[DouyuEx] "+s+":等待目标节点 "+t+" 秒仍未出现(预期内可缺省,已放弃)")}catch(e){}else ExGuard_warn(s,"等待目标节点 "+t+" 秒仍未出现,已放弃(不影响其它功能)")}}}return!(c.cancel=function(){c.cancelled=!0,i()})!==a.immediate&&(t(),c.done||c.cancelled)||(c.timer=setInterval(t,r)),c}function ExGuard_xhr(e,l){return new Promise(function(t){function o(e){n||(n=!0,t(void 0===e?null:e))}let n=!1,i=Object.assign({},e||{}),a=i.tag||"请求",r=i.onload;i.onload=function(e){let t=null;try{var n;null===(t="function"==typeof r&&void 0!==(n=r(e))?n:t)&&e&&(t=e.response)}catch(e){ExGuard_warn(a,"响应处理抛错,按失败处理",e),t=null}o(t)},i.onerror=function(e){ExGuard_warn(a,"请求失败:"+(i.url||"(无地址)"),e),o(null)},i.ontimeout=function(){ExGuard_warn(a,"请求超时:"+(i.url||"(无地址)")),o(null)},i.timeout||(i.timeout=0{fetch(l[s+t]).catch(e=>{fetch(l[s+t])})}))}d.step=e.length,Promise.all(e).then(function(e){return p(u(e,function(e){return e&&e.blob}),function(e){return e.blob()})}).then(function(e){return Promise.all(e)}).then(function(e){e=p(e,function(t,r){return new Promise(function(i,e){var a=new FileReader;a.readAsArrayBuffer(new Blob([t],{type:"octet/stream"})),a.addEventListener("loadend",function(e){var t,n,o;i(a.result),d.onprogress&&d.onprogress({segment:s+r+1,total:l.length,percentage:((s+r+1)/l.length*100).toFixed(3),downloaded:(e=>{for(var t=[{divider:1e18,suffix:"EB"},{divider:1e15,suffix:"PB"},{divider:1e12,suffix:"TB"},{divider:1e9,suffix:"GB"},{divider:1e6,suffix:"MB"},{divider:1e3,suffix:"kB"}],n=0;n=t[n].divider)return(e/t[n].divider).toString().toString().split(".")[0]+t[n].suffix;return e.toString()})((t=p(c,function(e){return e.byteLength}),n=function(e,t){return e+t},o=0,t.forEach(function(e,t){e=+n(o,e,t),o=e}),+o)),status:"Downloading..."})})})}),Promise.all(e).then(function(e){for(var t=0;t>5]|=128<>>9<<4)]=t;for(var n=1732584193,o=-271733879,i=-1732584194,a=271733878,r=0;r>16)+(t>>16)+(n>>16))<<16|65535&n}function bit_rol(e,t){return e<>>32-t}function str2binl(e){for(var t=Array(),n=(1<>5]|=(e.charCodeAt(o/chrsz)&n)<>5]>>>o%32&n);return t}function binl2hex(e){for(var t=hexcase?"0123456789ABCDEF":"0123456789abcdef",n="",o=0;o<4*e.length;o++)n+=t.charAt(e[o>>2]>>o%4*8+4&15)+t.charAt(e[o>>2]>>o%4*8&15);return n}function binl2b64(e){for(var t="",n=0;n<4*e.length;n+=3)for(var o=(e[n>>2]>>n%4*8&255)<<16|(e[n+1>>2]>>(n+1)%4*8&255)<<8|e[n+2>>2]>>(n+2)%4*8&255,i=0;i<4;i++)8*n+6*i>32*e.length?t+=b64pad:t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>6*(3-i)&63);return t}((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("NoticeJs",[],t):"object"==typeof exports?exports.NoticeJs=t():e.NoticeJs=t()})("undefined"!=typeof self?self:this,function(){return n=[function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.noticeJsModalClassName="noticejs-modal",t.closeAnimation="noticejs-fadeOut",t.Defaults={title:"",text:"",type:"success",position:"topRight",timeout:30,progressBar:!0,closeWith:["button"],animation:null,modal:!1,scroll:{maxHeight:300,showOnHover:!0},rtl:!1,callbacks:{beforeShow:[],onShow:[],afterShow:[],onClose:[],afterClose:[],onClick:[],onHover:[],onTemplate:[]}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.appendNoticeJs=t.addListener=t.CloseItem=t.AddModal=void 0,t.getCallback=r;var o=(e=>{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t})(n=n(0));var a=o.Defaults;function r(t,e){t.callbacks.hasOwnProperty(e)&&t.callbacks[e].forEach(function(e){"function"==typeof e&&e.apply(t)})}var l=t.AddModal=function(){var e;document.getElementsByClassName(o.noticeJsModalClassName).length<=0&&((e=document.createElement("div")).classList.add(o.noticeJsModalClassName),e.classList.add("noticejs-modal-open"),document.body.appendChild(e),setTimeout(function(){e.className=o.noticeJsModalClassName},200))},i=t.CloseItem=function(e){r(a,"onClose"),null!==a.animation&&null!==a.animation.close&&(e.className+=" "+a.animation.close),setTimeout(function(){e.remove()},200),!0===a.modal&&1<=document.querySelectorAll("[noticejs-modal='true']").length&&(document.querySelector(".noticejs-modal").className+=" noticejs-modal-close",setTimeout(function(){document.querySelector(".noticejs-modal").remove()},500));var t="."+e.closest(".noticejs").className.replace("noticejs","").trim();setTimeout(function(){var e;document.querySelectorAll(t+" .item").length<=0&&null!=(e=document.querySelector(t))&&e.remove()},500)},s=t.addListener=function(t){a.closeWith.includes("button")&&t.querySelector(".close").addEventListener("click",function(){i(t)}),a.closeWith.includes("click")?(t.style.cursor="pointer",t.addEventListener("click",function(e){"close"!==e.target.className&&(r(a,"onClick"),i(t))})):t.addEventListener("click",function(e){"close"!==e.target.className&&r(a,"onClick")}),t.addEventListener("mouseover",function(){r(a,"onHover")})};t.appendNoticeJs=function(e,t,n){var o=".noticejs-"+a.position,i=document.createElement("div");return i.classList.add("item"),i.classList.add(a.type),!0===a.rtl&&i.classList.add("noticejs-rtl"),e&&""!==e&&i.appendChild(e),i.appendChild(t),n&&""!==n&&i.appendChild(n),["top","bottom"].includes(a.position)&&(document.querySelector(o).innerHTML=""),null!==a.animation&&null!==a.animation.open&&(i.className+=" "+a.animation.open),!0===a.modal&&(i.setAttribute("noticejs-modal","true"),l()),s(i,a.closeWith),r(a,"beforeShow"),r(a,"onShow"),document.querySelector(o).appendChild(i),r(a,"afterShow"),i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n'+this.textTemplate.content+'
"},getConfirmTemplate:function(){return''+this.textTemplate.content+'?
"},getPromptTemplate:function(){return'"},alert:function(e){this.textTemplate.title=e.title||this.textTemplate.title,this.textTemplate.content=e.content||this.textTemplate.content,this.textTemplate.okBtn=e.okBtn||this.textTemplate.okBtn,this.textTemplate.okBtnColor=e.okBtnColor||this.textTemplate.okBtnColor,this.textTemplate.contentColor=e.contentColor||this.textTemplate.contentColor;var t=document.createElement("div"),n=this,o=(t.className=this.containerClass,t.innerHTML=this.getAlertTemplate(),this.box=t,document.body.appendChild(this.box),document.getElementsByClassName("btn-footer-ok"));o[o.length-1].focus(),o[o.length-1].onclick=function(){e.onConfirm&&e.onConfirm(),n.removeBox()},(o=t.querySelector(".postbird-box-close-btn"))&&(o.onclick=function(){n.removeBox()})},confirm:function(e){this.textTemplate.title=e.title||this.textTemplate.promptTitle,this.textTemplate.promptPlaceholder=e.promptPlaceholder||this.textTemplate.promptPlaceholder,this.textTemplate.okBtn=e.okBtn||this.textTemplate.promptOkBtn,this.textTemplate.okBtnColor=e.okBtnColor||this.textTemplate.okBtnColor,this.textTemplate.cancelBtn=e.cancelBtn||this.textTemplate.cancelBtn,this.textTemplate.cancelBtnColor=e.cancelBtnColor||this.textTemplate.cancelBtnColor,this.textTemplate.content=e.content||this.textTemplate.content;var t=document.createElement("div"),n=this,o=((this.box=t).className=this.containerClass,t.innerHTML=this.getConfirmTemplate(),document.body.appendChild(t),document.getElementsByClassName("btn-footer-ok"));o[o.length-1].focus(),o[o.length-1].onclick=function(){e.onConfirm&&e.onConfirm(),n.removeBox()},(o=document.getElementsByClassName("btn-footer-cancel"))[o.length-1].onclick=function(){e.onCancel&&e.onCancel(),n.removeBox()},(o=t.querySelector(".postbird-box-close-btn"))&&(o.onclick=function(){n.removeBox()})},prompt:function(e){this.textTemplate.title=e.title||this.textTemplate.title,this.textTemplate.content=e.content||this.textTemplate.content,this.textTemplate.contentColor=e.contentColor||this.textTemplate.contentColor,this.textTemplate.okBtn=e.okBtn||this.textTemplate.okBtn,this.textTemplate.okBtnColor=e.okBtnColor||this.textTemplate.okBtnColor,this.textTemplate.cancelBtn=e.cancelBtn||this.textTemplate.cancelBtn,this.textTemplate.cancelBtnColor=e.cancelBtnColor||this.textTemplate.cancelBtnColor;var t=document.createElement("div"),n=this;t.className=this.containerClass,t.innerHTML=this.getPromptTemplate(),this.box=t,document.body.appendChild(t);var o=(o=document.getElementsByClassName("postbird-prompt-input"))[o.length-1],i=(null!=e.defaultValue&&(o.value=e.defaultValue),o.focus(),document.getElementsByClassName("btn-footer-ok"));o.value,i[i.length-1].focus(),i[i.length-1].onclick=function(){e.onConfirm&&e.onConfirm(o.value),n.removeBox()},(i=document.getElementsByClassName("btn-footer-cancel"))[i.length-1].onclick=function(){e.onCancel&&e.onCancel(o.value),n.removeBox()},(i=t.querySelector(".postbird-box-close-btn"))&&(i.onclick=function(){n.removeBox()})},colse:function(){this.removeBox()},removeBox:function(){var e=document.getElementsByClassName(this.containerClass);e&&0e.text()).then(e=>{var t=(e=(new DOMParser).parseFromString(e,"text/html")).getElementsByTagName("html")[0].innerHTML,n="$ROOM.room_id =".length,o=t.indexOf("$ROOM.room_id =");let i="";0{console.log("请求失败!",e)})}function getRealLive_Huya(e,t,o){let n="500";switch(t){case"1":n="500";break;case"2":n="2500";break;case"3":n="4500";break;case"4":n="0";break;default:n="500"}GM_xmlhttpRequest({method:"GET",url:"https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid="+e,responseType:"json",onload:e=>{let t="",n="";e=e.response.data.stream.flv.multiLine;null!=(n=e.length&&0e.inline);if(0!==n.length){let t=e.textContent;for(let e=0;e""!==e).map(e=>stt_deserialize(e)):e.includes("@=")?e.split("/").filter(e=>""!==e).reduce((e,t)=>{var[t,n]=t.split("@=");return e[t]=stt_deserialize(stt_unescape(n)),e},{}):e.includes("@A=")?stt_deserialize(stt_unescape(e)):e.toString()}function StyleHook_set(e,t){var n,o;if(null==document.getElementById(e))return(n=document.body||document.head||document.documentElement)?((o=document.createElement("style")).id=e,o.innerHTML=t,void n.append(o)):document.addEventListener("DOMContentLoaded",function(){StyleHook_set(e,t)},{once:!0})}function StyleHook_remove(e){null!==document.getElementById(e)&&document.getElementById(e).remove()}function StyleHook_setIframe(e,t,n){var o;null==e.getElementById(t)&&(o=e.body||e.head||e.documentElement)&&((e=e.createElement("style")).id=t,e.innerHTML=n,o.append(e))}function StyleHook_removeIframe(e,t){null!==e.getElementById(t)&&e.getElementById(t).remove()}function WebSocket_Packet(e){var t=stringToByte(e),e=new Uint8Array(t.length+4+4+2+1+1+1),n=new Uint8Array(t.length);for(let e=0;e>18&7|240),o.push(n>>12&63|128),o.push(n>>6&63|128),o.push(63&n|128)):2048<=n&&n<=65535?(o.push(n>>12&15|224),o.push(n>>6&63|128),o.push(63&n|128)):128<=n&&n<=2047?(o.push(n>>6&31|192),o.push(63&n|128)):o.push(255&n);return o}function byteToString(t){if("string"!=typeof t){let e="",o=t;for(let n=0;n>8*t+4&15]+o[n>>8*t&15];return t}).join("")}}class Ex_WebSocket_UnLogin{constructor(e,t){"WebSocket"in window&&(this.timer=0,this.rid=e,this.msgHandler=t,this.reconnectCount=0,this.maxReconnect=10,this.closed=!1,this.connect())}connect(){this.ws=new WebSocket("wss://danmuproxy.douyu.com:850"+String(getRandom(2,5))),this.ws.onopen=()=>{this.reconnectCount=0,this.ws.send(WebSocket_Packet("type@=loginreq/roomid@="+this.rid)),this.ws.send(WebSocket_Packet("type@=joingroup/rid@="+this.rid+"/gid@=-9999/")),this.timer=setInterval(()=>{this.ws.send(WebSocket_Packet("type@=mrkl/"))},4e4)},this.ws.onerror=()=>{if(!this.closed&&this.ws)try{this.ws.close()}catch(e){}},this.ws.onmessage=t=>{if(!this.closed){let e=new FileReader;e.onload=()=>{if(!this.closed){var t=String(e.result).split("\0");e=null;for(let e=0;e{clearInterval(this.timer),this.timer=0,this.ws=null,this.closed||this.reconnect()}}reconnect(){var e;this.closed||this.reconnectCount>=this.maxReconnect||(this.reconnectCount++,e=Math.min(3e3*Math.pow(1.5,this.reconnectCount-1),6e4),setTimeout(()=>{this.closed||this.connect()},e))}close(){if(!this.closed&&(this.closed=!0,clearInterval(this.timer),this.timer=0,this.ws)){var e=this.ws;this.ws=null,e.onclose=null,e.onerror=null,e.onmessage=null;try{e.readyState!==WebSocket.OPEN&&e.readyState!==WebSocket.CONNECTING||e.close()}catch(e){}}}}function initRouter(e){-1!==String(e).indexOf("yuba.douyu.com")?(-1!==String(e).indexOf("?exRestore")?initPkg_RestoreYuba_restore:-1!==String(e).indexOf("?exClean")?initRouter_CleanYuba:initRouter_Yuba)():-1!==String(e).indexOf("passport.douyu.com")&&-1!==String(e).indexOf("exid=chun")?initRouter_Passport():-1!==String(e).indexOf("msg.douyu.com")?-1!==e.indexOf("?exClean")&&initRouter_CleanMsg():-1!==String(e).indexOf("v.douyu.com")?-1!==String(e).indexOf("?exClean")?initRouter_CleanVideo():-1!==String(e).indexOf("show/")&&initRouter_Video():-1!==String(e).indexOf("cz.douyu.com")?-1!==String(e).indexOf("?exClean")&&initRouter_CleanCz():-1!==String(e).indexOf("getFansBadgeList")?initRouter_FansBadgeList():-1!==String(e).indexOf("exid=chun")?initRouter_DouyuRoom_Popup():-1===String(e).indexOf("template/")&&-1===String(e).indexOf("h5/")&&initRouter_DouyuRoom_Main()}function initRouter_DouyuRoom_Popup(){removeAD();let o=0,i=setInterval(()=>{var e=document.querySelector("div.wfs-2a8e83"),t=document.querySelector("label.layout-Player-asidetoggleButton"),n=document.querySelectorAll(".tip-e3420a > ul > li");e&&t&&0{var e=document.getElementsByClassName("BackpackButton")[0],t=document.getElementsByClassName("Barrage-main")[0],n=document.querySelector("#js-backpack-enter"),o=(i++,!(!t||!e&&!n));!o&&i<15||(o||console.warn("[DouyuEx] 未等到预期页面元素(弹幕区: "+!!t+",背包入口: "+(!!e||!!n)+"),已等待 "+i+" 秒,仍继续初始化"),setTimeout(()=>{initStyles(),initPkg(),initPkgSpecial(),initTimer()},1500),clearInterval(a))},1e3)}function initPkgSpecial(){}function initRouter_Yuba(){document.domain="douyu.com",RestoreYuba_checkRedirect()}function initRouter_Passport(){var e=getStrMiddle(window.location.href,"cmd=","&"),t=getStrMiddle(window.location.href,"uid=","&");let n=getStrMiddle(window.location.href,"domain=","&");switch("clean"!==e&&addAccountPassport(t),e){case"clean":cleanCookie(()=>{window.parent.postMessage("cleanOver",decodeURIComponent(n))});break;case"switch":switchAccountPassport(t,()=>{window.parent.postMessage("switchOver",decodeURIComponent(n))});break;case"delete":deleteAccountPassport(t,()=>{window.parent.postMessage("deleteOver",decodeURIComponent(n))})}}function initRouter_CleanMsg(){let e=getStrMiddle(window.location.href,"domain=","&");cleanCookie(()=>{window.parent.postMessage("msgCleanOver",decodeURIComponent(e))})}function initRouter_CleanYuba(){let e=getStrMiddle(window.location.href,"domain=","&");cleanCookie(()=>{window.parent.postMessage("yubaCleanOver",decodeURIComponent(e))})}function initRouter_CleanVideo(){let e=getStrMiddle(window.location.href,"domain=","&");cleanCookie(()=>{window.parent.postMessage("videoCleanOver",decodeURIComponent(e))})}function initRouter_CleanCz(){let e=getStrMiddle(window.location.href,"domain=","&");cleanCookie(()=>{window.parent.postMessage("czCleanOver",decodeURIComponent(e))})}function initRouter_Video(){unsafeWindow.$DATA&&"ROOM"in unsafeWindow.$DATA&&(initStyles(),initPkg_VideoTime(),initPkg_VideoTools_Camera_Video(),initPkg_DyVideoDownload(),initPkg_DyVideoBarrageLine())}function initRouter_FansBadgeList(){initPkg_FansBadgeList()}(async()=>{initRouter(window.location.href)})();