"use strict"; // ==UserScript== // @name DouyuEx-斗鱼直播间增强插件 // @namespace https://github.com/qianjiachun // @icon data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTA4cHgiIGhlaWdodD0iMTA4cHgiIHZpZXdCb3g9IjAgMCAxMDggMTA4IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPueyvueBteeQgzwvdGl0bGU+CiAgICA8ZyBpZD0i6aG16Z2iLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLnsr7ngbXnkIMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuODMwNzY5LCAwLjgzMDc2OSkiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik01My4xNjkyMzA3LDEwNi4zMzg0NjEgQzIzLjgyNzY5MjIsMTA2LjMzODQ2MSAwLDgyLjUxMDc2OTIgMCw1My4xNjkyMzA3IEMwLDUxLjAwMzA3NjkgMS43NzIzMDc3NSw0OS4yMzA3NjkyIDMuOTM4NDYxNSw0OS4yMzA3NjkyIEwzMy40NzY5MjMsNDkuMjMwNzY5MiBDMzUuNjQzMDc2OSw0OS4yMzA3NjkyIDM3LjQxNTM4NDUsNTEuMDAzMDc3IDM3LjQxNTM4NDYsNTMuMTY5MjMwNyBDMzcuNDE1Mzg0Niw2MS44MzM4NDYxIDQ0LjUwNDYxNTQsNjguOTIzMDc2OSA1My4xNjkyMzA3LDY4LjkyMzA3NjkgQzYxLjgzMzg0NjEsNjguOTIzMDc2OSA2OC45MjMwNzY5LDYxLjgz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环发送 一键续牌 查看真实人数/查看主播数据 已播时长 一键签到(直播间/车队/鱼吧/客户端) 一键领取鱼粮(宝箱/气泡/任务) 一键寻宝 送出指定数量的礼物 一键清空背包 屏蔽广告 调节弹幕大小 自动更新 同屏画中画/多直播间小窗观看/可在斗鱼看多个平台直播(虎牙/b站) 获取真实直播流地址 自动抢礼物红包 背包信息扩展 简洁模式 夜间模式 开播提醒 幻神模式 关键词回复 关键词禁言 自动谢礼物 自动抢宝箱 弹幕右键信息扩展 防止下播自动跳转 影院模式 直播时间流控制 弹幕投票 直播滤镜 直播音频流 账号多开/切换 显示粉丝牌获取日期 月消费数据显示 弹幕时速 相机截图录制gif 全景播放器 斗鱼视频下载/弹幕ass下载 直播画面局部缩放 全站抽奖信息 直播音效增强 阻止P2P上传 显示贡献榜贡献值 恢复弹幕显示 斗鱼视频弹幕高能进度条 检测弹幕是否发送成功 查看主播配置信息 自动网页全屏 自动最高画质 弹幕无限收藏 收藏弹幕搜索 支持弹幕带图片 屏蔽弹幕背景 弹幕+1 房间VIP到期提醒 自动钓鱼 防止自动暂停直播 恢复已关闭鱼吧 弹幕小尾巴 屏蔽重复弹幕 画质增强 // @author 小淳 // @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 // @connect douyucdn.cn // @connect douyu.com // @connect 122.51.5.63 // @connect qq.com // @connect rrocr.com // @connect douyuex.com // @connect bojianger.com // @connect greasyfork.org // @connect bilibili.com // @connect huya.com // @connect jsdelivr.net // @connect shadiao.app // @connect shadiao.pro // @connect fz996.com // @connect toubang.tv // @connect doseeing.com // @antifeature tracking // @downloadURL none // ==/UserScript== function init() { initPkg_ShowDanmakuOriginAction(); initPkg_Shield_RemoveRepeatedDanmaku_ScriptHook(); initScriptHook(); initPkg_Night_Set_Fast(); initResponseHook(); initPkg_ShowDanmaku(); initKillP2P(); initFullScreen(); initHighestVideoQuality(); removeAD(); initPkg_Statistics(); initPkg_Console(); initPkg_Menu(); initPkg_FollowList(); } function initPkg() { Update_checkVersion(); initPkg_DanmakuTail(); initPkg_ReturnOldWeb(); initPkg_Night(); initPkg_ExIcon(); initPkg_ExPanel(); initPkg_RealAudience(); initPkg_CopyRealLive(); initPkg_AudioLine(); initPkg_RemoveAD(); initPkg_Shield(); initPkg_BagInfo(); initPkg_Update(); // initPkg_SyncJoy(); initPkg_Fkbuff(); initPkg_Monitor(); initPkg_Lottery(); // initPkg_MiniProgram(); initPkg_PopupPlayer(); initPkg_LiveTool(); initPkg_VideoTools(); initPkg_ExpandTool(); initPkg_Refresh(); initPkg_BarrageLoop(); initPkg_FansContinue(); // initPkg_FishFood(); initPkg_Sign(); initPkg_BarragePanel(); // initPkg_AdVideo(); initPkg_AccountList(); initPkg_ChatTools(); initPkg_MonthCost(); initPkg_RoomVip(); initPkg_WeeklyPanel(); initPkg_DanmakuCollect(); initPkg_RestoreYuba(); initPkg_ChangeDanmakuLengthLimit(); initPkg_CheckAnchorPocket(); } function initPkg_Timer() { // initPkg_FishPond_Timer(); initPkg_LevelTask_Timer(); initPkg_Sign_OPFOY_Timer(); initPkg_DisableCloseJump_Timer(); } function initTimer() { initPkg_Timer(); } function initStyles() { let style = document.createElement("style"); 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;}#ex-audio-line { cursor: pointer;}.live-next-body #ex-audio-line { margin-left: 4px;}.bag-info { position: absolute; background-color: rgba(0, 0, 0, 0.6); color: white; width: 20px; font-weight: 800; height: 20px; 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;}.bloop { background-color: rgba(255,255,255,0.9); width: 100%; height: 200px; position: relative; bottom: 200px; display: none; z-index: 1428; color: #333;}.bloop__switch { position: absolute; right: 0; bottom: 0;}.bloop__mode { display: inline-block;}#bloop__select { width: 150px;}.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;}.ChatToolBar-DanmakuTail { display: inline-block; vertical-align: middle; width: 18px; height: 18px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; margin-right: 8px; color: #bbb; cursor: pointer;}[data-mantine-color-scheme=dark] .ChatToolBar-DanmakuTail-tip { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAABGdBTUEAALGPC/xhBQAACklpQ0NQc1JHQiBJRUM2MTk2Ni0yL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Uy8w3XOSN9H4DKHngjnga2TgAAAAASUVORK5CYII=) 50% / 18px 18px no-repeat;}.ChatToolBar-DanmakuTail-tip { width: 18px; height: 18px; text-align: center; line-height: 18px; border-radius: 4px; font-size: 12px; color: #fff; cursor: pointer; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAPFBMVEUAAADKy8zKy8zExMzKy83Ky83KzMzKzM7Kys3Ky8zKy83Jy8zJy83Ky8zLzMzJzMzIyM3MzMzKzMzKy8zUpkOsAAAAE3RSTlMA5PgF2qdrQ+rqysOOhzw3HBnqZkz8cgAAAN5JREFUOMuNlEkOAyEMBNs2y+xL/P+/JgoJaGCAqZOFSk0fLOOL7M7ONLBGeDCTdZsgcq6kdzAtBwLiSauMPoR5ow2Mx4dj1CZ0ArJoh1Ww/Quh5Be1w3F0apaD1a5kMSVJLyRphuknEYaGpIEXuC7pD4YWnaITuUiIdKRkVCRNRlUq+te+a0p4Ujy9ZkMpIaeUgJrEld6aYAxZJS2nF+hGwnUwmHOp/HSCzffybn1dubyZww47aQfaIGtPWgQ4O1Hj8fRgQPzYKOQFgWMhvlfWExHZnJ3M9RzSbN0eYt4fdzsuAVjiHAAAAABJRU5ErkJggg==) 50% / 18px 18px no-repeat;}.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;}.ChatToolBar-DanmakuTail-Panel { background-color: rgba(255, 255, 255, 0.9); width: 100%; height: 140px; position: relative; display: none; z-index: 1015; color: #333;}.ChatToolBar-DanmakuTail-Panel__cell { position: relative; display: -webkit-box; display: -webkit-flex; display: flex; box-sizing: border-box; width: 100%; padding: 10px 16px; overflow: hidden; color: #323233; font-size: 14px; line-height: 24px; background-color: #fff; border-bottom: 1px solid rgba(0, 0, 0, 0.2); flex-wrap: wrap; -webkit-flex-wrap: wrap;}.ChatToolBar-DanmakuTail-Panel__cell_title { flex: 1; -webkit-box-flex: 1;}.ChatToolBar-DanmakuTail-Panel__cell_option { text-align: right;}.ChatToolBar-DanmakuTail-Panel__cell_switch { float: right;}.ChatToolBar-DanmakuTail-title { margin: 0 10px; font-size: 16px; font-weight: bold;}.DanmakuTail-input { margin: 10px; width: calc(100% - 20px); height: 2.2em;}.DanmakuTail-checkbox-label,.DanmakuTail-option-label { margin: 10px; width: calc(100% - 20px); display: block; text-align: right;}.EnergyBarrageIcon { margin-right: 8px;}.ex-icon { display: inline-block; vertical-align: middle; margin-right: 8px; -moz-user-select:none; /*火狐*/ -webkit-user-select:none; /*webkit浏览器*/ -ms-user-select:none; /*IE10*/ -khtml-user-select:none; /*早期浏览器*/ user-select:none;}.ex-icon a { display: flex; justify-items: center; align-items: center;}.ex-icon svg:hover { transform: scale(1.1);}.extool { background-color: rgba(255,255,255,0.9); width: 100%; height: 200px; position: relative; bottom: 200px; display: none; z-index: 1428; color: #333;}.extool__switch { position: absolute; right: 0; bottom: 0;}.extool__bsize,.extool__sendgift { margin-bottom: 5px;}.extool__redpacket_room,.extool__gold,.extool__autofish { display: inline-block;}.ex_giftAnimation { width: 100%; height: 100%; position: absolute; z-index: 50; pointer-events: none;}.ex-panel { position: absolute; bottom: 32px; right: 0px; background-color: rgba(255,255,255,0.9); border: 2px rgb(234,173,26) solid; z-index: 1428; user-select: none; display: none;}.ex-panel__wrap { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;}.ex-panel__icon { margin: 0 10px; display: block; position: relative; padding: 5px; transition: 0.5s;}.ex-panel__icon:hover { transform: scale(1.15);}.ex-panel__tip { display:none; background:#f00; border-radius:50%; width:8px; height:8px; top:0px; right:0px; position:absolute;}/* 新版斗鱼右侧弹幕Panel的bottom */.live-next-body .layout-Player-chat>* { bottom: 0 !important;}.text-879f3e { height: auto !important; max-height: 48px !important;}.ex-image-danmaku { height: 48px; border-radius: 6px; margin: 0 4px;}.danmuContent-25f266 .ex-image-danmaku { max-height: 32px;}.barrageSpeed { position: absolute; right: 10px; top: -20px; color: rgba(0,0,0,0.5); cursor: default; z-index: 0;}.enter__panel { width: 100%; display: none; margin-top: 4px;}#enter__title { cursor: pointer; user-select: none; color: royalblue;}#enter__select { width: 190px;}.enter__option { margin-top: 5px;}#enter__enterId { width: 40px;}#enter__reply { width: 150px;}#enter__word { width: 140px;}#enter__level { width: 25px; text-align: center;}#enter__export { cursor: pointer; color: royalblue; margin-left: 10px;}#enter__import { cursor: pointer; color: royalblue; margin-left: 5px;}.gift__panel { width: 100%; display: none; margin-top: 4px;}#gift__title { cursor: pointer; user-select: none; color: royalblue;}#gift__select { width: 113px;}.gift__option { margin-top: 5px;}#gift__giftId { width: 40px;}#gift__reply { width: 150px;}#gift__export { cursor: pointer; color: royalblue; margin-left: 10px;}#gift__import { cursor: pointer; color: royalblue; margin-left: 5px;}.livetool { background-color: rgba(255,255,255,0.9); width: 100%; height: 290px; position: relative; bottom: 290px; display: none; z-index: 1428;}.livetool__cell { position: relative; display: -webkit-box; display: -webkit-flex; display: flex; box-sizing: border-box; width: 100%; padding: 10px 16px; overflow: hidden; color: #323233; font-size: 14px; line-height: 24px; background-color: #fff; border-bottom: 1px solid rgba(0,0,0,0.2); flex-wrap: wrap; -webkit-flex-wrap: wrap;}.livetool__cell_title { flex: 1; -webkit-box-flex: 1;}.livetool__cell_option { text-align: right;}.livetool__cell_switch { float: right;}.mute__panel { width: 100%; display: none; margin-top: 4px;}#mute__title { cursor: pointer; user-select: none; color: royalblue;}#mute__idlist { cursor: pointer; color: royalblue; margin-left: 10px;}#mute__export, #mute__import { cursor: pointer; color: royalblue; margin-left: 5px;}#mute__select { width: 110px;}.mute__option { margin-top: 5px;}#mute__word { width: 70px;}#mute__count { width: 30px;}#mute__time { width: 65px;}.exRankPoint { position: absolute; right: 16px;}.exRankPoint--top { position: absolute; bottom: -12px; right: 0; left: 0;}.reply__panel { width: 100%; display: none; margin-top: 4px;}#reply__title { cursor: pointer; user-select: none; color: royalblue;}#reply__select { /* width: 190px; */ width: 100px;}#reply__time { width: 35px;}.reply__option { margin-top: 5px;}#reply__word { width: 70px;}#reply__reply { width: 147px;}#reply__export { cursor: pointer; color: royalblue; margin-left: 10px;}#reply__import { cursor: pointer; color: royalblue; margin-left: 5px;}.livetool__Treasure { width: 100%; position: relative; z-index: 999;}.vote__panel { width: 100%; display: none; margin-top: 4px;}#vote__title { cursor: pointer; user-select: none; color: royalblue;}#vote__select { width: 100px;}.vote__option { margin-top: 5px;}#vote__theme { width: 70px;}#vote__options { width: 133px;}#vote__time { width: 35px;}#vote__show-result { cursor: pointer; color: royalblue; margin-left: 10px;}.vote__result { position: absolute; top: 0px; width: 300px; background: rgba(255,255,255,0.85); left: 0px; z-index: 999; padding: 5px; border-radius: 10px; user-select: none; display: none; color: #333;}#vote__result-theme { font-size: 20px; font-weight: 600; margin-bottom: 10px;}#vote__result-close { position: absolute; top: 5px; right: 10px; font-size: 14px; cursor: pointer; color: gray;}.vote__option-wrap { margin-bottom: 10px;}.vote__option-choice { display: inline-block; font-size: 14px;}.vote__option-num { float: right; font-size: 14px;}.vote__progress { width: 100%; background-color: #ddd; border-radius: 10px;}.vote__progress-bar { width: 0%; height: 14px; background-color: #4CAF50; text-align: center; line-height: 30px; border-radius: 10px;}.exlottery { background-color: rgba(255,255,255,1); width: 100%; height: 250px; position: relative; bottom: 250px; display: none; z-index: 1428; overflow: auto; padding: 0 10px; box-sizing: border-box;}.lottery__nodata { z-index: 998; position: absolute; left:50%; top:50%; transform: translate(-50%, -50%); color: #606266;}.lottery__wrap { display: flex; flex-direction: column; z-index: 999;}.lottery__a:hover .lottery__item { background-color: rgb(244,244,244);}.lottery__item { display: flex; padding: 5px 0; border-bottom: 1px solid #d0d0d0; color: #606266;}.lottery__img img { width: 150px; border-radius: 5px;}.lottery__anchor { position: absolute; background-color: rgba(255,255,255,0.9); border-radius: 5px 0px 5px 0px;}.lottery__info { display: flex; justify-content: space-evenly; flex-direction: column; margin-left: 10px; overflow: hidden;}.lottery__prize { white-space: nowrap; text-overflow: ellipsis; word-break: break-all; font-size: 14px;}.lottery__expireTime { position: absolute; margin-top: -18px; background-color: rgba(255,255,255,0.9); border-radius: 0px 5px 0px 5px;} /*滚动条样式*/.exlottery::-webkit-scrollbar { width: 4px; }.exlottery::-webkit-scrollbar-thumb { border-radius: 10px; box-shadow: inset 0 0 5px rgba(0,0,0,0.2); background: rgba(0,0,0,0.2);}.exlottery::-webkit-scrollbar-track { box-shadow: inset 0 0 5px rgba(0,0,0,0.2); border-radius: 0; background: rgba(0,0,0,0.1);}.lottery__func { display: flex; justify-content: space-between; margin-top: 5px; user-select: none; border-bottom: 1px solid #d0d0d0;}.lottery__notice,#lottery-refresh { cursor: pointer; color: #606266;}.miniprogram__panel { position: absolute; right: 43px; bottom: 100px; animation: move-in 0.75s; z-index: 101; text-align: center; display: none;}.miniprogram__wrap { overflow: hidden; background-color: white; border-radius: 5%; width: 200px; box-shadow: 0px 2px 20px 0px #888888; font-size: 14px;}.miniprogram__triangle { width: 0px; height: 0px; border-color: white transparent transparent transparent; border-style: solid; border-width: 10px; position: absolute; left: 100px;}.month-cost { margin-right: 5px; cursor: default; -moz-user-select:none;/*火狐*/ -webkit-user-select:none;/*webkit浏览器*/ -ms-user-select:none;/*IE10*/ -khtml-user-select:none;/*早期浏览器*/ user-select:none; display: inline-block; vertical-align: middle;}.monthcost__icon { position: relative; top: 3px; cursor: pointer; margin-left: 3px;}.exVideoDiv { width: 500px; height: 250px; background-color: rgba(255, 255, 255, 0); position: absolute; z-index: 1428;}.exVideoPlayer { width: 100%; height: 100%; cursor: move;}.exVideoScale { width: 10px; height: 10px; overflow: hidden; cursor: se-resize; position: absolute; right: 0; bottom: 0; background-color: rgb(231, 57, 57);}.exVideoInfo { width: 100%; height: 30px; background-color: gray; position: absolute; top: -30px; line-height: 30px;}.exVideoClose { width: 30px; float: right; color: white;}.exVideoQn, .exVideoCDN { margin-left: 5px;}.exVideoRID { margin: 0px 5px; font-weight: 800; font-size: medium;}#popup-player__prompt { display: none;}.postbird-box-header { width: auto !important;}.postbird-box-dialog { color: #333;}.real-audience { cursor: pointer; display: flex; padding: 0 7px; line-height: 33px; color: rgb(153, 153, 153);}#Ex_EnterYuba { width: 100%;}.Title-anchorPic-bottom i{ display: none !important;}#real-audience__total, #real-audience__barrage, #real-audience__money_yc { margin-left: 2px;}/* #refresh-video { float: left; width: 24px; height: 24px; margin-right: 5px; cursor: pointer; background-size: contain;} */#refresh-video2 { display: none; position: absolute; top: 20px; right: 20px; cursor: pointer;}#refresh-video2-svg { fill: rgba(0,0,0,.6)}.refresh-barrage { display: inline-block; vertical-align: top; margin: 0 2px; padding: 0 8px; height: 22px; line-height: 21px; background-color: #fff; border: 1px solid #e5e4e4; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; cursor: pointer; user-select: none;}.live-next-body .refresh-barrage { background-color: var(--front-background-color); border: 1px solid var(--front-border-color);}#refresh-barrage__svg { vertical-align: middle;}.top-0-important { top: 0 !important;}.icon__jumpoldweb>img:hover { opacity: .8 !important;}.room-vip { -moz-user-select:none;/*火狐*/ -webkit-user-select:none;/*webkit浏览器*/ -ms-user-select:none;/*IE10*/ -khtml-user-select:none;/*早期浏览器*/ user-select:none; vertical-align: middle; float: left;}.repeated-danmaku { opacity: 0 !important; pointer-events: none !important; visibility: hidden !important;}#ex-camera { background: rgba(0,0,0,0.7); position: absolute; right: 20px; bottom: 190px; z-index: 10; width: 60px; height: 60px; cursor: pointer; -webkit-border-radius: 50%; -moz-border-radius: 50%; border-radius: 50%; cursor: pointer; display: none; justify-content: center; align-items: center; border: 2px solid #2d2c2c; box-sizing: border-box;}#ex-camera:hover > svg > path { fill: rgb(252, 199, 84);}#ex-camera:active > svg > path { fill: rgb(253, 60, 60);}#ex-camera-close { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; background: rgba(0,0,0,0.8); border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; color: #fff; font-size: 12px; line-height: 1; border: 1px solid rgba(255,255,255,0.3); z-index: 11;}#ex-camera-close:hover { background: rgba(253, 60, 60, 0.9);}#ex-cinema:hover > .cinema__wrap { display: block;}.cinema__wrap { display: none; margin: 0; padding: 0; border: 1px solid #e5e5e5; background: #fff; position: absolute; left: 199px; min-width: 100px; top: 130px;}.cinema__panel { position: absolute; border: 1px solid #000; border-radius: 4px; transform: translateY(calc(-4px - 100%)) translateX(-50%); left: 33%; background-color: #000; opacity: .75; width: 70px;}.cinema__panel li { padding: 0 2px; white-space: nowrap; color: #fff; text-align: center; cursor: pointer;}.cinema__panel li:hover { background-color: rgb(85, 85, 85);} #ex-joysound { float: left; width: 24px; height: 24px; margin-right: 10px; cursor: pointer; background-size: contain; pointer-events: all;}#ex-joysound img { width: 24px; height: 24px;}#exVideoDivFake { display: none;}#ex-metadata:hover > .metadata__wrap { display: block;}.metadata__wrap { display: none; margin: 0; padding: 0; border: 1px solid #e5e5e5; background: #fff; position: absolute; left: 199px; min-width: 100px; top: 0px; white-space: nowrap;}.metadata__panel { position: absolute; border: 1px solid #000; border-radius: 4px; transform: translateY(calc(-4px - 100%)) translateX(-50%); left: 33%; background-color: #000; opacity: .75; width: 70px;}.metadata__panel li { padding: 0 2px; white-space: nowrap; color: #fff; text-align: center; cursor: pointer;}.metadata__panel li:hover { background-color: rgb(85, 85, 85);} #ex-filter { float: left; width: 24px; height: 24px; margin-right: 10px; cursor: pointer; background-size: contain; pointer-events: all;}.filter__wrap { display: none; position: relative; height: 100%; margin-right: -15px; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; float: left; right: -12px; bottom: 10px;}.filter__panel { position: absolute; border: 1px solid #000; border-radius: 4px; transform: translateY(calc(-4px - 100%)) translateX(-50%); left: 33%; background-color: #000; opacity: .75; width: 300px; padding-top: 10px; padding-left: 10px; padding-right: 10px;}.filter__panel li { padding: 0 2px; white-space: nowrap; color: #fff; text-align: center; cursor: pointer;}.filter__panel li:hover { background-color: rgb(85, 85, 85);}.filter__scroll { width: 100%; height: 5px; background: #ccc; position: relative; display: inline-block;}.filter__scroll-bar { width: 15px; height: 15px; background: #369; position: absolute; top: -5px; left: 100px; cursor: pointer; border-radius: 100%;}.filter__scroll-mask { position: absolute; left: 0; top: 0; background: #369; width: 100px; height: 5px;}.filter__title { color: white; display: inline-block; cursor: initial; margin-right: 2px;}.filter__enhance { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between;}.filter__switch { width: 40px; height: 20px; background: #ccc; position: relative; display: inline-block; border-radius: 10px; cursor: pointer; transition: background 0.3s;}.filter__switch-slider { width: 18px; height: 18px; background: #fff; position: absolute; top: 1px; left: 0px; border-radius: 50%; transition: left 0.3s;}#filter__select { width: 100%; float: right;}.filter__filter { margin-top: 5px;}/* 增强画质提示弹窗样式 */.enhance-modal__panel-wrap { width: 100%; height: 100%; z-index: 1000; background-color: rgba(0, 0, 0, 0.9); position: absolute; top: 0; left: 0; display: none; justify-content: center; align-items: center;}.enhance-modal__panel { height: 550px; width: 600px; background-color: white; border-radius: 20px; position: fixed; top: 0; left: 0; right: 0; bottom: 0; margin: auto; color: #333;}.enhance-modal__content { position: relative; top: 50%; transform: translateY(-50%); text-align: center;}.enhance-modal__text { font-size: 18px; margin-top: 20px;}.enhance-modal__img { width: 720px; margin-top: 20px;}.enhance-modal__close { font-size: 30px; font-weight: bold; position: absolute; right: 15px; top: 10px; cursor: pointer; transition: all 0.2s;}.enhance-modal__close:hover { color: #ff7700;}#ex-videospeed:hover > .videospeed__wrap { display: block;}.videospeed__wrap { display: none; margin: 0; padding: 0; border: 1px solid #e5e5e5; background: #fff; position: absolute; left: 199px; min-width: 100px; top: 120px;}.videospeed__panel { position: absolute; border: 1px solid #000; border-radius: 4px; transform: translateY(calc(-4px - 100%)) translateX(-50%); left: 33%; background-color: #000; opacity: .75; width: 70px;}.videospeed__panel li { padding: 0 2px; white-space: nowrap; color: #fff; text-align: center; cursor: pointer;}.videospeed__panel li:hover { background-color: rgb(85, 85, 85);} #ex-videosync { float: left; width: 24px; height: 24px; margin-left: 20px; cursor: pointer; background-size: contain;}.menu-da2a9e { z-index: 999 !important;}.weeklypanel__panel-wrap { width: 100%; height: 100%; z-index: 1000; background-color: rgba(0, 0, 0, 0.9); position: absolute; top: 0; left: 0; display: flex; justify-content: center; align-items: center;}.weeklypanel__panel { height: 600px; width: 500px; background-color: white; border-radius: 20px; position: fixed; top: 0; left: 0; right: 0; bottom: 0; margin: auto;}.weeklypanel__content { position: relative; top: 50%; transform: translateY(-50%); text-align: center;}.weeklypanel__text { font-size: 18px;}.weeklypanel__text a { font-weight: bold; font-size: 24px;}.weeklypanel__close { font-size: 30px; font-weight: bold; position: absolute; right: 15px; cursor: pointer;}.noticejs-top{top:0;width:100% !important}.noticejs-top .item{border-radius:0 !important;margin:0 !important}.noticejs-topRight{top:10px;right:10px}.noticejs-topLeft{top:10px;left:10px}.noticejs-topCenter{top:10px;left:50%;transform:translate(-50%)}.noticejs-middleLeft,.noticejs-middleRight{right:10px;top:50%;transform:translateY(-50%)}.noticejs-middleLeft{left:10px}.noticejs-middleCenter{top:50%;left:50%;transform:translate(-50%,-50%)}.noticejs-bottom{bottom:0;width:100% !important}.noticejs-bottom .item{border-radius:0 !important;margin:0 !important}.noticejs-bottomRight{bottom:10px;right:10px}.noticejs-bottomLeft{bottom:10px;left:10px}.noticejs-bottomCenter{bottom:10px;left:50%;transform:translate(-50%)}.noticejs{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.noticejs .item{margin:0 0 10px;border-radius:3px;overflow:hidden}.noticejs .item .close{float:right;font-size:18px;font-weight:700;line-height:1;color:#fff;text-shadow:0 1px 0 #fff;opacity:1;margin-right:7px}.noticejs .item .close:hover{opacity:.5;color:#000}.noticejs .item a{color:#fff;border-bottom:1px dashed #fff}.noticejs .item a,.noticejs .item a:hover{text-decoration:none}.noticejs .success{background-color:#64ce83}.noticejs .success .noticejs-heading{background-color:#3da95c;color:#fff;padding:10px}.noticejs .success .noticejs-body{color:#fff;padding:10px}.noticejs .success .noticejs-body:hover{visibility:visible !important}.noticejs .success .noticejs-content{visibility:visible}.noticejs .info{background-color:#3ea2ff}.noticejs .info .noticejs-heading{background-color:#067cea;color:#fff;padding:10px}.noticejs .info .noticejs-body{color:#fff;padding:10px}.noticejs .info .noticejs-body:hover{visibility:visible !important}.noticejs .info .noticejs-content{visibility:visible}.noticejs .warning{background-color:#ff7f48}.noticejs .warning .noticejs-heading{background-color:#f44e06;color:#fff;padding:10px}.noticejs .warning .noticejs-body{color:#fff;padding:10px}.noticejs .warning .noticejs-body:hover{visibility:visible !important}.noticejs .warning .noticejs-content{visibility:visible}.noticejs .error{background-color:#e74c3c}.noticejs .error .noticejs-heading{background-color:#ba2c1d;color:#fff;padding:10px}.noticejs .error .noticejs-body{color:#fff;padding:10px}.noticejs .error .noticejs-body:hover{visibility:visible !important}.noticejs .error .noticejs-content{visibility:visible}.noticejs .progressbar{width:100%}.noticejs .progressbar .bar{width:1%;height:30px;background-color:#4caf50}.noticejs .success .noticejs-progressbar{width:100%;background-color:#64ce83;margin-top:-1px}.noticejs .success .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#3da95c}.noticejs .info .noticejs-progressbar{width:100%;background-color:#3ea2ff;margin-top:-1px}.noticejs .info .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#067cea}.noticejs .warning .noticejs-progressbar{width:100%;background-color:#ff7f48;margin-top:-1px}.noticejs .warning .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#f44e06}.noticejs .error .noticejs-progressbar{width:100%;background-color:#e74c3c;margin-top:-1px}.noticejs .error .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:#ba2c1d}@keyframes noticejs-fadeOut{0%{opacity:1}to{opacity:0}}.noticejs-fadeOut{animation-name:noticejs-fadeOut}@keyframes noticejs-modal-in{to{opacity:.3}}@keyframes noticejs-modal-out{to{opacity:0}}.noticejs-rtl .noticejs-heading{direction:rtl}.noticejs-rtl .close{float:left !important;margin-left:7px;margin-right:0 !important}.noticejs-rtl .noticejs-content{direction:rtl}.noticejs{position:fixed;z-index:10050;width:320px}.noticejs::-webkit-scrollbar{width:8px}.noticejs::-webkit-scrollbar-button{width:8px;height:5px}.noticejs::-webkit-scrollbar-track{border-radius:10px}.noticejs::-webkit-scrollbar-thumb{background:hsla(0,0%,100%,.5);border-radius:10px}.noticejs::-webkit-scrollbar-thumb:hover{background:#fff}.noticejs-modal{position:fixed;width:100%;height:100%;background-color:#000;z-index:10000;opacity:.3;left:0;top:0}.noticejs-modal-open{opacity:0;animation:noticejs-modal-in .3s ease-out}.noticejs-modal-close{animation:noticejs-modal-out .3s ease-out;animation-fill-mode:forwards}.noticejs .special{background-color:rgb(160,37,160)}.noticejs .special .noticejs-heading{background-color:rgb(110,26,110);color:#fff;padding:10px}.noticejs .special .noticejs-body{color:#fff;padding:10px}.noticejs .special .noticejs-body:hover{visibility:visible !important}.noticejs .special .noticejs-content{visibility:visible}.noticejs .special .noticejs-progressbar{width:100%;background-color:rgb(160,37,160);margin-top:-1px}.noticejs .special .noticejs-progressbar .noticejs-bar{width:100%;height:5px;background:rgb(110,26,110)}/** * PostbirdAlertBox.js * - 原生javascript弹框插件 * Author: Postbird - http://www.ptbird.cn * License: MIT * Date: 2017-09-23 */ .postbird-box-container { width: 100%; height: 100%; overflow: hidden; position: fixed; top: 0; left: 0; z-index: 9999; background-color: rgba(0, 0, 0, 0.2); display: block; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none}.postbird-box-container.active { display: block}.postbird-box-content { min-width: 400px; max-width: 600px; min-height: 150px; background-color: #fff; border: solid 1px #dfdfdf; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin-top: -100px}.postbird-box-header { width: 100%; padding: 10px 15px; position: relative; font-size: 1.1em; letter-spacing: 2px}.postbird-box-close-btn { cursor: pointer; font-weight: 700; color: #000; float: right; opacity: .5; font-size: 1.3em; margin-top: -3px; display: none}.postbird-box-close-btn:hover { opacity: 1}.postbird-box-text { box-sizing: border-box; width: 100%; padding: 0 10%; text-align: center; line-height: 40px; font-size: 20px; letter-spacing: 1px}.postbird-box-footer { width: 100%; position: absolute; padding: 0; margin: 0; bottom: 0; display: flex; display: -webkit-flex; justify-content: space-around; border-top: solid 1px #dfdfdf; align-items: flex-end}.postbird-box-footer .btn-footer { line-height: 44px; border: 0; cursor: pointer; background-color: #fff; color: #0e90d2; font-size: 1.1em; letter-spacing: 2px; transition: background-color .5s; -webkit-transition: background-color .5s; -o-transition: background-color .5s; -moz-transition: background-color .5s; outline: 0}.postbird-box-footer .btn-footer:hover { background-color: #e5e5e5}.postbird-box-footer .btn-block-footer { width: 100%}.postbird-box-footer .btn-left-footer,.postbird-box-footer .btn-right-footer { position: relative; width: 100%}.postbird-box-footer .btn-left-footer::after { content: ""; position: absolute; right: 0; top: 0; background-color: #e5e5e5; height: 100%; width: 1px}.postbird-box-footer .btn-footer-cancel { color: #333}.postbird-prompt-input { width: 100%; padding: 5px; font-size: 16px; border: 1px solid #ccc; outline: 0}.onoffswitch { position: relative; width: 45px; -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;}.onoffswitch-checkbox { position: absolute; opacity: 0; pointer-events: none;}.onoffswitch-label { display: block; overflow: hidden; cursor: pointer; height: 20px; padding: 0; line-height: 20px; border: 2px solid #E3E3E3; border-radius: 20px; background-color: #FFFFFF; transition: background-color 0.3s ease-in;}.onoffswitch-label:before { content: ""; display: block; width: 20px; margin: 0px; background: #FFFFFF; position: absolute; top: 0; bottom: 0; right: 23px; border: 2px solid #E3E3E3; border-radius: 20px; transition: all 0.3s ease-in 0s; }.onoffswitch-checkbox:checked + .onoffswitch-label { background-color: #3AAD38;}.onoffswitch-checkbox:checked + .onoffswitch-label, .onoffswitch-checkbox:checked + .onoffswitch-label:before { border-color: #3AAD38;}.onoffswitch-checkbox:checked + .onoffswitch-label:before { right: 0px; }.layui-timeline { padding-left: 5px;}.layui-timeline-item { position: relative; padding-bottom: 20px;}li { list-style: none;}.layui-timeline-item:first-child::before { display: block;}.layui-timeline-item:last-child::before { content: ''; position: absolute; left: 5px; top: 0; z-index: 0; width: 0; height: 100%;}.layui-timeline-item::before { content: ''; position: absolute; left: 5px; top: 0; z-index: 0; width: 1px; height: 100%;}.layui-timeline-item::before,hr { background-color: #e6e6e6;}.layui-timeline-axis { position: absolute; left: -5px; top: 0; z-index: 10; width: 20px; height: 20px; line-height: 20px; background-color: #fff; color: #5FB878; border-radius: 50%; text-align: center; cursor: pointer;}.layui-icon { font-family: layui-icon !important; font-size: 16px; font-style: normal;}.layui-timeline-content { padding-left: 25px;}.layui-text { line-height: 22px; font-size: 14px; color: rgb(85,85,85);}.layui-timeline-title { position: relative;} `)); document.head.appendChild(style); } // 全局变量及公共函数 var exTimer = 0; // 总时钟句柄 var url = document.getElementsByTagName('html')[0].innerHTML; var urlLen = ("$ROOM.room_id =").length; var ridPos = url.indexOf('$ROOM.room_id ='); var rid = ""; if (ridPos > 0) { rid = url.substring(ridPos + urlLen, url.indexOf(';', ridPos + urlLen)); if (rid) rid = rid.trim(); } else { rid = getStrMiddle(url, `roomID:`, `,`); if (rid) { rid = rid.trim(); } else { let canonicalLink = document.querySelector(`link[rel="canonical"]`); if (canonicalLink) { let href = canonicalLink.getAttribute(`href`); rid = href.split('/').pop().trim(); } } } url = null; urlLen = null; ridPos = null; var my_uid = getCookieValue("acf_uid"); // 自己的uid var myName = ""; var dyToken = getToken(); // 功能条的显示定时器 var exPanelTimer = null; function sleep(time) { return new Promise((resolve) => setTimeout(resolve, time)); } function formatSeconds(value) { let secondTime = parseInt(value); let minuteTime = 0; let hourTime = 0; if (secondTime > 60) { minuteTime = parseInt(secondTime / 60); secondTime = parseInt(secondTime % 60); if (minuteTime > 60) { hourTime = parseInt(minuteTime / 60); minuteTime = parseInt(minuteTime % 60); } } let result = "" + parseInt(secondTime) + "秒"; if (minuteTime > 0) { result = "" + parseInt(minuteTime) + "分" + result; } if (hourTime > 0) { result = "" + parseInt(hourTime) + "小时" + result; } return result; } function formatSeconds2(value) { var secondTime = parseInt(value); // 秒 var minuteTime = 0; // 分 var hourTime = 0; // 小时 if (secondTime > 60) { minuteTime = parseInt(secondTime / 60); secondTime = parseInt(secondTime % 60); if (minuteTime > 60) { hourTime = parseInt(minuteTime / 60); minuteTime = parseInt(minuteTime % 60); } } var result ="" +(parseInt(secondTime) < 10? "0" + parseInt(secondTime): parseInt(secondTime)); // if (minuteTime > 0) { result ="" + (parseInt(minuteTime) < 10? "0" + parseInt(minuteTime) : parseInt(minuteTime)) + ":" + result; // } // if (hourTime > 0) { result ="" + (parseInt(hourTime) < 10 ? "0" + parseInt(hourTime): parseInt(hourTime)) +":" + result; // } return result; } async function verifyFans(room_id, level) { return true; // 2020年12月22日18:28:18 let ret = false; let doc = await fetch('https://www.douyu.com/member/cp/getFansBadgeList',{ method: 'GET', mode: 'no-cors', cache: 'default', credentials: 'include', }).then(res => { return res.text(); }).catch(err => { console.log("请求失败!", err); }) doc = (new DOMParser()).parseFromString(doc, 'text/html'); let a = doc.getElementsByClassName("fans-badge-list")[0].lastElementChild; let n = a.children.length; for (let i = 0; i < n; i++) { let rid = a.children[i].getAttribute("data-fans-room"); let rlv = a.children[i].getAttribute("data-fans-level"); if (rid == room_id && rlv >= level) { ret = true; break; } else { ret = false; } } return ret; } function getStrMiddle(str, before, after) { let m = str.match(new RegExp(before + '(.*?)' + after)); return m ? m[1] : false; } function getToken() { // let cookie = document.cookie; // let ret = getStrMiddle(cookie, "acf_uid=", ";") + "_" + getStrMiddle(cookie, "acf_biz=", ";") + "_" + getStrMiddle(cookie, "acf_stk=", ";") + "_" + getStrMiddle(cookie, "acf_ct=", ";") + "_" + getStrMiddle(cookie, "acf_ltkid=", ";"); let ret = getCookieValue("acf_uid") + "_" + getCookieValue("acf_biz") + "_" + getCookieValue("acf_stk") + "_" + getCookieValue("acf_ct") + "_" + getCookieValue("acf_ltkid"); return ret; } function getDyDid() { // let cookie = document.cookie; // let ret = getStrMiddle(cookie, "dy_did=", ";"); let ret = getCookieValue("dy_did"); return ret; } function setCookie(cookiename, value){ let exp = new Date(); exp.setTime(exp.getTime() + 3*60*60*1000); document.cookie = cookiename + "="+ escape (value) + "; path=/; expires=" + exp.toGMTString(); } function getCookieValue(name){ let arr,reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); if (arr = document.cookie.match(reg)) { return unescape(arr[2]); } else { return null; } } function getCCN() { // let cookie = document.cookie; // let ret = getStrMiddle(cookie, "acf_ccn=", ";"); let ret = getCookieValue("acf_ccn"); if (ret == null) { setCookie("acf_ccn", "1"); ret = "1"; } return ret; } function getCTN() { // let cookie = document.cookie; // let ret = getStrMiddle(cookie, "acf_ccn=", ";"); let ret = getCookieValue("acf_ctn"); if (ret == null) { setCookie("acf_ctn", "1"); ret = "1"; } return ret; } function getCSRF() { let ret = getCookieValue("cvl_csrf_token"); if (ret == null) { setCookie("cvl_csrf_token", "1"); ret = "1"; } return ret; } function getUID() { let ret = getCookieValue("acf_uid"); return ret; } function showMessage(msg, type="success", options) { // type: success[green] error[red] warning[orange] info[blue] let option = { text: msg, type: type, position: 'bottomLeft', ...options } new NoticeJs(option).show(); } function openPage(url, b=true) { GM_openInTab(url, { active: b }); } function closePage() { if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Chrome") != -1) { window.location.href = "about:blank"; window.close(); } else { window.opener = null; window.open("", "_self"); window.close(); } } function getQueryString(name) { let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); if (window.location.hash.indexOf("?") < 0) { return null; } let r = window.location.hash.split("?")[1].match(reg); if (r != null) return decodeURIComponent(r[2]); return null; } function dateFormat(fmt, date) { let o = { "M+": date.getMonth() + 1, "d+": date.getDate(), "h+": date.getHours(), "m+": date.getMinutes(), "s+": date.getSeconds(), "q+": Math.floor((date.getMonth() + 3) / 3), "S": date.getMilliseconds() }; if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length)); for (let k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); return fmt; } function getRandom(min, max) { return Math.floor(Math.random() * (max - min) + min); } function isRid(str) { if (/^[0-9]+$/.test(str)) { return true; } else { return false; } } function getAvailableSheet(index) { let ret = -1; for (let i = index; i < document.styleSheets.length - index; i++) { if (document.styleSheets[i].href == null) { ret = i; break; } else { ret = -1; } } return ret; } function showMessageWindow(title, content, callback){ if(window.Notification && Notification.permission !== "denied") { Notification.requestPermission(function(status) { var notice_ = new Notification(title, { body: content }); notice_.onclick = function() { callback(); } }); } } function getUserName() { return new Promise(resovle => { fetch('https://www.douyu.com/member/cp',{ method: 'GET', mode: 'no-cors', credentials: 'include', }).then(res => { return res.text(); }).then(txt => { txt = (new DOMParser()).parseFromString(txt, 'text/html'); let ret = txt.getElementsByClassName("uname_con")[0].title; resovle(ret); }).catch(err => { console.error('请求失败', err); }) }) } function getTextareaPosition(element) { // 如果元素是textarea,直接使用selectionStart获取位置 if (element.tagName === 'TEXTAREA') { return element.selectionStart; } // 否则处理为contenteditable元素 let cursorPos = 0; // 兼容旧版IE if (document.selection) { const selectRange = document.selection.createRange(); const textRange = element.createTextRange(); const preCaretRange = textRange.duplicate(); preCaretRange.moveToBookmark(selectRange.getBookmark()); preCaretRange.setEndPoint('EndToEnd', textRange); cursorPos = preCaretRange.text.length; } // 现代浏览器 else if (window.getSelection) { const selection = window.getSelection(); if (selection.rangeCount > 0) { const range = selection.getRangeAt(0).cloneRange(); range.selectNodeContents(element); range.setEnd(selection.rangeCount > 0 ? selection.getRangeAt(0).endContainer : element, selection.rangeCount > 0 ? selection.getRangeAt(0).endOffset : 0); cursorPos = range.toString().length; } } return cursorPos; } function showExRightPanel(name) { let panels = [ { name: "弹幕发送小助手", className: "bloop", }, { name: "扩展功能", className: "extool", }, { name: "直播间工具", className: "livetool", }, { name: "全站抽奖信息", className: "exlottery" }, { name: "弹幕小尾巴", className: "ChatToolBar-DanmakuTail-Panel" }, ]; for (let i = 0; i < panels.length; i++) { let item = panels[i]; let dom = document.getElementsByClassName(item.className)[0]; if (dom) { if (name === item.name) { dom.style.display = dom.style.display !== "block" ? "block" : "none"; } else { dom.style.display = "none"; } } } } function getTimeDiff(t1, t2) { if (t1 < t2) { return -1; } else{ let ret = ""; let date3 = Math.abs(t1 - t2); let days = Math.floor(date3/(24*3600*1000)); ret += days > 0 ? days + "天" : ""; let leave1 = date3%(24*3600*1000); let hours = Math.floor(leave1/(3600*1000)); ret += hours > 0 ? hours + "时" : ""; let leave2 = leave1%(3600*1000); let minutes = Math.floor(leave2/(60*1000)); ret += minutes > 0 ? minutes + "分" : ""; let leave3 = leave2%(60*1000); let seconds = Math.round(leave3/1000); ret += seconds > 0 ? seconds + "秒" : ""; return ret; } } function debounce(func, wait) { let timer; return function() { let context = this; let args = arguments; if (timer) clearTimeout(timer); let callNow = !timer; timer = setTimeout(() => { timer = null; }, wait) if (callNow) func.apply(context, args); } } function exportJsonToExcel(header, body, fileName = 'download.xlsx') { let aoa = []; aoa.push(header, ...body); let sheet = XLSX.utils.aoa_to_sheet(aoa); openDownloadDialog(sheet2blob(sheet), fileName); } function openDownloadDialog(url, saveName) { if(typeof url == 'object' && url instanceof Blob) { url = URL.createObjectURL(url); // 创建blob地址 } var aLink = document.createElement('a'); aLink.href = url; aLink.download = saveName || ''; // HTML5新增的属性,指定保存文件名,可以不要后缀,注意,file:///模式下不会生效 var event; if(window.MouseEvent) event = new MouseEvent('click'); else { event = document.createEvent('MouseEvents'); event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); } aLink.dispatchEvent(event); } function sheet2blob(sheet, sheetName) { sheetName = sheetName || 'sheet1'; var workbook = { SheetNames: [sheetName], Sheets: {} }; workbook.Sheets[sheetName] = sheet; // 生成excel的配置项 var wopts = { bookType: 'xlsx', // 要生成的文件类型 bookSST: false, // 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性 type: 'binary' }; var wbout = XLSX.write(workbook, wopts); var blob = new Blob([s2ab(wbout)], {type:"application/octet-stream"}); // 字符串转ArrayBuffer function s2ab(s) { var buf = new ArrayBuffer(s.length); var view = new Uint8Array(buf); for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF; return buf; } return blob; } function downloadFile(name, data) { var urlObject = unsafeWindow.URL || unsafeWindow.webkitURL || unsafeWindow; var export_blob = new Blob([data]); var save_link = document.createElementNS("http://www.w3.org/1999/xhtml", "a") save_link.href = urlObject.createObjectURL(export_blob); save_link.download = name; var ev = document.createEvent("MouseEvents"); ev.initMouseEvent("click", true, false, unsafeWindow, 0, 0, 0, 0, 0, false, false, false, false, 0, null); save_link.dispatchEvent(ev); } function timeText2Ms(text) { let ret = 0; let arr = text.split(":"); if (arr.length === 1) { ret = Number(arr[0]); } else if (arr.length === 2) { ret = Number(arr[0]) * 60 + Number(arr[1]); } else if (arr.length === 3) { ret = Number(arr[0]) * 3600 + Number(arr[1]) * 60 + Number(arr[2]); } return ret * 1000; } function resizeWindow() { const resizeEvent = new Event("resize"); window.dispatchEvent(resizeEvent); } function isValidImageFile(filename) { const validExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg", ".bmp", ".ico", ".tiff", ".tif"]; const ext = filename.substring(filename.lastIndexOf(".")).toLowerCase(); return validExtensions.includes(ext); } function getCsrfToken() { return new Promise((resolve) => { GM_xmlhttpRequest({ method: 'POST', url: 'https://www.douyu.com/japi/carnival/nc/common/generateCsrf', headers: { "Content-Type": "application/json", "Cookie": document.cookie, }, anonymous: false, withCredentials: true, onload: function(response) { // 获取 Set-Cookie const setCookie = response.responseHeaders.match(/set-cookie:[^\n\r]+/gi); // 从set-cookie中获取csrfToken let csrfToken = ""; for (const line of setCookie) { const match = line.match(/cvl_csrf_token=([^;]+)/); if (match) { csrfToken = match[1]; // 返回提取到的 token break; } } resolve(csrfToken); }, onerror: function(err) { resolve(""); } }); }); } function getValidDom(queryList) { for (const query of queryList) { let dom = null; if (typeof query === "string") { dom = document.querySelector(query); } else { dom = query; } if (dom) return dom; } return null; } function getValidDomList(queryList) { for (const query of queryList) { let dom = []; if (typeof query === "string") { dom = document.querySelectorAll(query); } else { dom = query; } if (dom.length > 0) return dom; } return []; } let svg_accountList = `` let cleanOverTimes = 0; // 用于判断是否全部清空并跳转 function initPkg_AccountList() { // GM_deleteValue("Ex_accountList"); // GM_deleteValue("Ex_accountListPassport"); // return; const isBeta = !!document.getElementsByClassName("live-next-body")[0]; if (isBeta) return; initPkg_AccountList_Dom(); initPkg_AccountList_Func(); } function initPkg_AccountList_Dom() { AccountList_insertIcon(); } function AccountList_insertIcon() { let a = document.createElement("div"); a.style = "position: absolute;right: -14px;top: 32px;cursor: pointer;" a.id = "ex-accountList-icon"; let html = `
';
let b = document.getElementsByClassName("ex-panel__wrap")[0];
b.insertBefore(a, b.childNodes[0]);
}
function initPkg_FansContinue_Func() {
document.getElementsByClassName("fans-continue")[0].addEventListener("click", function() {
let sendNum = prompt("每个直播间赠送几根荧光棒?", "1");
if (sendNum == null) {
return;
}
if (sendNum == "") {
return;
}
let giftId = 0;
getBagGifts(rid, (ret) => {
let chunkNum = ret.data.list.length;
if (chunkNum > 0) {
for (let i = 0; i < chunkNum; i++) {
if (ret.data.list[i].id == 268) {
giftId = 268;
break;
}
if (ret.data.list[i].id == 2358) {
giftId = 2358;
}
}
if (giftId == 0) {
showMessage("没有足够的道具", "error");
return;
};
fetch('https://www.douyu.com/member/cp/getFansBadgeList',{
method: 'GET',
mode: 'no-cors',
cache: 'default',
credentials: 'include',
}).then(res => {
return res.text();
}).then(async (doc) => {
doc = (new DOMParser()).parseFromString(doc, 'text/html');
let a = doc.getElementsByClassName("fans-badge-list")[0].lastElementChild;
let n = a.children.length;
for (let i = 0; i < n; i++) {
let rid = a.children[i].getAttribute("data-fans-room"); // 获取房间号
await sleep(250).then(() => {
sendGift_bag(giftId, Number(sendNum), rid).then(data => {
if (data.msg == "success") {
showMessage("【续牌】" + rid + "赠送荧光棒成功", "success");
// console.log(rid + "赠送一根荧光棒成功");
} else {
showMessage("【续牌】" + rid + "赠送失败 " + data.msg, "error");
// console.log(rid + "赠送失败");
console.log(rid, data);
}
}).catch(err => {
showMessage("【续牌】" + rid + "赠送失败", "error");
console.log(rid, err);
})
});
}
}).catch(err => {
console.log("请求失败!", err);
})
} else {
showMessage("背包礼物为空", "error");
}
});
});
}
function sendGift_bag(gid, count, rid) {
// 送背包里的东西
// gid: 268是荧光棒
// count: 数量
// rid: 房间号
return fetch("https://www.douyu.com/japi/prop/donate/mainsite/v1", {
method: 'POST',
mode: 'no-cors',
credentials: 'include',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: 'propId=' + gid + '&propCount=' + count + '&roomId=' + rid + '&bizExt=%7B%22yzxq%22%3A%7B%7D%7D'
}).then(res => {
return res.json();
})
}
function initPkg_FirePower() {
initPkg_FirePower_Dom();
initPkg_FirePower_Func();
}
function initPkg_FirePower_Dom() {
FirePower_insertIcon();
}
function FirePower_insertIcon() {
let a = document.createElement("div");
a.className = "firepower";
a.innerHTML = '';
let b = document.getElementsByClassName("ex-panel__wrap")[0];
b.insertBefore(a, b.childNodes[0]);
}
function initPkg_FirePower_Func() {
document.getElementsByClassName("firepower")[0].addEventListener("click", function() {
fetch('https://www.douyu.com/japi/firepower/apinc/activeTask/getRecRid', {
method: 'POST',
mode: 'no-cors',
credentials: 'include',
headers: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"},
body: "token=" + getCCN()
}).then(result => {
return result.json();
}).then(ret => {
let rid = ret.data;
window.location.href = "https://www.douyu.com/" + rid;
}).catch(err => {
console.log("请求失败!", err);
})
});
}
function initPkg_Fkbuff() {
initPkg_Fkbuff_Dom();
initPkg_Fkbuff_Func();
}
function initPkg_Fkbuff_Dom() {
Fkbuff_insertIcon();
}
function Fkbuff_insertIcon() {
let a = document.createElement("div");
a.className = "ex-fkbuff";
a.innerHTML = `${ item.online }${ item.room_name }
${ item.nickname }已播${ formatSeconds(nowTime - Number(item.show_time)) }
${ item.online }${ item.room_name }
${ item.nickname }已播${ formatSeconds(nowTime - Number(item.show_time)) }
秒内重复的弹幕只显示一次
` ); const dom = document.getElementById("ex-removeRepeatedDanmaku"); const statusSpan = dom.querySelector(".FilterSwitchStatus-status"); const switchSpan = dom.querySelector(".FilterSwitchStatus-switch"); const secondsInput = document.getElementById("ex-repeatedDanmakuSeconds"); const enlargeCheckbox = document.getElementById("ex-enlargeDanmaku"); // 阻止输入框和checkbox点击事件冒泡 secondsInput.addEventListener("click", (e) => { e.stopPropagation(); }); enlargeCheckbox.addEventListener("click", (e) => { e.stopPropagation(); }); // 输入框值改变事件 secondsInput.addEventListener("input", () => { let value = parseInt(secondsInput.value); if (isNaN(value) || value < 1) { value = 1; secondsInput.value = 1; } else if (value > 300) { value = 300; secondsInput.value = 300; } repeatedDanmakuSeconds = value; setLocalRepeatedDanmakuSeconds(value); // 如果功能已开启,需要重启以应用新设置 if (isRemoveRepeatedDanmaku) { if (repeatedDanmakuDomHook) { repeatedDanmakuDomHook.closeHook(); repeatedDanmakuDomHook = null; } stopRepeatedDanmakuCleanupTimer(); removeRepeatedDanmaku(); } }); // checkbox改变事件 enlargeCheckbox.addEventListener("change", () => { isEnlargeDanmaku = enlargeCheckbox.checked; setLocalIsEnlargeDanmaku(isEnlargeDanmaku); }); dom.addEventListener("click", () => { isRemoveRepeatedDanmaku = !isRemoveRepeatedDanmaku; if (isRemoveRepeatedDanmaku) { removeRepeatedDanmaku(); statusSpan.className = statusSpan.className.replace("is-noChecked", "is-checked"); statusSpan.textContent = "已开启"; switchSpan.className = switchSpan.className.replace("is-noChecked", "is-checked"); } else { if (repeatedDanmakuDomHook) { repeatedDanmakuDomHook.closeHook(); repeatedDanmakuDomHook = null; } stopRepeatedDanmakuCleanupTimer(); StyleHook_remove("Ex_Style_RemoveRepeatedDanmaku"); StyleHook_remove("Ex_Style_RemoveRepeatedDanmaku_Count"); statusSpan.className = statusSpan.className.replace("is-checked", "is-noChecked"); statusSpan.textContent = "未开启"; switchSpan.className = switchSpan.className.replace("is-checked", "is-noChecked"); } saveRemoveRepeatedDanmaku(); }); } function initPkg_Shield_RemoveRepeatedDanmaku_ScriptHook() { scriptHook({ url: "/firstqueue", callback: (content) => { let newContent = content; // 给弹幕飘屏添加属性 newContent = newContent.replace(`e.display=new e.renderer(e);`, `e.display=new e.renderer(e);e.display.raw.comment=e;`); return newContent; } }); } 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; } ` ); let timer = setInterval(() => { const dom = document.querySelector(".danmu-fbb2a3"); if (dom) { clearInterval(timer); // 开启定期清理定时器 startRepeatedDanmakuCleanupTimer(); repeatedDanmakuDomHook = new DomHook(".danmu-fbb2a3", false, (m) => { if (m.length <= 0) return; if (!isRemoveRepeatedDanmaku) return; if (m[0].addedNodes.length <= 0 && m[0].removedNodes.length > 0) { const removedDom = m[0].removedNodes[0]; const uuid = removedDom.comment.uuid; const endTime = removedDom.comment.startTime + removedDom.comment.duration; const now = Date.now(); if (now > endTime) return; // 存储过期时间戳 repeatedDanmakuUuidMap[uuid] = now + repeatedDanmakuSeconds * 1000; // 清理与该弹幕相关的DOM映射,防止内存泄露 const danmakuText = removedDom.textContent ? removedDom.textContent.trim() : ""; if (danmakuText && repeatedDanmakuDomMap[danmakuText] === removedDom) { // 移除DOM引用,避免内存泄露 delete repeatedDanmakuDomMap[danmakuText]; delete repeatedDanmakuCountMap[danmakuText]; // 同时清理过期时间,因为首条弹幕已经被移除了 delete repeatedDanmakuMap[danmakuText]; } return; } if (m[0].addedNodes.length <= 0) return; const dom = m[0].addedNodes[0]; if (!dom) return; const now = Date.now(); const uuid = dom.comment.uuid; // 检查 UUID 是否存在且未过期 const uuidExpireTime = repeatedDanmakuUuidMap[uuid]; if (uuidExpireTime && now <= uuidExpireTime) return; const danmakuText = dom.textContent ? dom.textContent.trim() : ""; if (!danmakuText || danmakuText.length === 0) return; // 检查弹幕是否在指定秒数内出现过 const expireTime = repeatedDanmakuMap[danmakuText]; if (expireTime && now <= expireTime) { // 这是重复弹幕,隐藏它 dom.className += " repeated-danmaku"; // 增加重复次数 repeatedDanmakuCountMap[danmakuText] = (repeatedDanmakuCountMap[danmakuText] || 1) + 1; // 如果开启了放大重复弹幕功能,找到首次出现的弹幕DOM并增加fontSize if (isEnlargeDanmaku) { const firstDom = repeatedDanmakuDomMap[danmakuText]; if (firstDom && firstDom.parentNode) { // 如果还没有保存原始fontSize,先保存 if (!repeatedDanmakuOriginalFontSizeMap.has(firstDom)) { const computedStyle = window.getComputedStyle(firstDom); const originalFontSize = computedStyle.fontSize; repeatedDanmakuOriginalFontSizeMap.set(firstDom, originalFontSize); // 添加字体大小变化的过渡动画效果 firstDom.style.transition = "font-size 0.5s ease"; } // 获取原始fontSize的数值 const originalFontSize = repeatedDanmakuOriginalFontSizeMap.get(firstDom); const baseFontSize = parseFloat(originalFontSize); // 计算新的fontSize:每多一条重复就+2,最大40 const repeatCount = repeatedDanmakuCountMap[danmakuText]; const newFontSize = Math.min(baseFontSize + (repeatCount - 1) * 2, 40); firstDom.style.fontSize = newFontSize + "px"; // 更新计数显示 firstDom.setAttribute("data-repeat-count", repeatCount); // 触发跳动动画 firstDom.classList.remove("danmaku-combo-animation"); // 强制重排以重新触发动画 void firstDom.offsetWidth; firstDom.classList.add("danmaku-combo-animation"); } else if (!firstDom || !firstDom.parentNode) { // 如果首条弹幕的DOM已经不存在了,清理相关数据,防止内存泄露 delete repeatedDanmakuDomMap[danmakuText]; delete repeatedDanmakuCountMap[danmakuText]; } } } else { // 首次出现的弹幕 repeatedDanmakuMap[danmakuText] = now + repeatedDanmakuSeconds * 1000; repeatedDanmakuDomMap[danmakuText] = dom; repeatedDanmakuCountMap[danmakuText] = 1; } }); } }, 1000); } // 定期清理过期的弹幕记录 function cleanupExpiredRepeatedDanmaku() { const now = Date.now(); // 删除过期的条目,清理Map防止内存泄露 for (const [key, expireTime] of Object.entries(repeatedDanmakuMap)) { if (expireTime <= now) { delete repeatedDanmakuMap[key]; // 同时清理相关的DOM映射和计数,防止内存泄露 // 不恢复fontSize,让弹幕保持放大的效果 delete repeatedDanmakuDomMap[key]; delete repeatedDanmakuCountMap[key]; } } // 清理过期的 UUID 记录 for (const [uuid, expireTime] of Object.entries(repeatedDanmakuUuidMap)) { if (expireTime <= now) { delete repeatedDanmakuUuidMap[uuid]; } } } // 启动清理定时器 function startRepeatedDanmakuCleanupTimer() { if (repeatedDanmakuCleanupTimer) return; // 避免重复启动 repeatedDanmakuCleanupTimer = setInterval(cleanupExpiredRepeatedDanmaku, 20000); } // 停止清理定时器 function stopRepeatedDanmakuCleanupTimer() { if (repeatedDanmakuCleanupTimer) { clearInterval(repeatedDanmakuCleanupTimer); repeatedDanmakuCleanupTimer = null; } // 清空对象释放内存 repeatedDanmakuMap = {}; repeatedDanmakuUuidMap = {}; repeatedDanmakuDomMap = {}; repeatedDanmakuCountMap = {}; } function saveRemoveRepeatedDanmaku() { setLocalIsRemoveRepeatedDanmaku(isRemoveRepeatedDanmaku); } function getLocalIsRemoveRepeatedDanmaku() { return localStorage.getItem("ExSave_isRemoveRepeatedDanmaku") === "1"; } function setLocalIsRemoveRepeatedDanmaku(value) { localStorage.setItem("ExSave_isRemoveRepeatedDanmaku", value ? "1" : "0"); } function getLocalRepeatedDanmakuSeconds() { const saved = localStorage.getItem("ExSave_repeatedDanmakuSeconds"); if (saved) { const value = parseInt(saved); if (!isNaN(value) && value >= 1 && value <= 60) { return value; } } return 5; // 默认5秒 } function setLocalRepeatedDanmakuSeconds(value) { localStorage.setItem("ExSave_repeatedDanmakuSeconds", value.toString()); } function getLocalIsEnlargeDanmaku() { const saved = localStorage.getItem("ExSave_isEnlargeDanmaku"); if (saved === null) { return false; // 默认不开启放大功能 } return saved === "1"; } function setLocalIsEnlargeDanmaku(value) { localStorage.setItem("ExSave_isEnlargeDanmaku", value ? "1" : "0"); } function initPkg_Shield() { // let t = setInterval(() => { // if (typeof document.getElementsByClassName("ShieldTool-list")[0] !== "undefined") { // clearInterval(t); // initPkg_Shield_RemoveEnter(); // initPkg_Shield_RemoveDanmakuBackground(); // } // }, 1000); let t = setInterval(() => { if (typeof document.getElementsByClassName("BarrageFilter")[0] !== "undefined") { clearInterval(t); new DomHook(".BarrageFilter", false, (m) => { if (m.length === 0) return; if (m[0].addedNodes.length > 0 && m[0].removedNodes.length === 0) { const domFilterKeywords = document.getElementsByClassName("FilterKeywords")[0]; if (domFilterKeywords) { initPkg_Shield_Enable(); } else { let t2 = setInterval(() => { const domFilterKeywords = document.getElementsByClassName("FilterKeywords")[0]; if (domFilterKeywords) { clearInterval(t2); initPkg_Shield_Enable(); } }, 50); } } }); } }, 1000); } function initPkg_Shield_Enable() { initPkg_Shield_RemoveRepeatedDanmaku(); initPkg_Shield_RemoveEnter(); initPkg_Shield_RemoveDanmakuBackground(); } function initPkg_ShowDanmaku() { responseHook((url, text) => { if (url.indexOf("/betard") !== -1) { return text.replace('player_barrage\":0', 'player_barrage\":1'); } return text; }); } function initPkg_ShowDanmakuOriginAction() { scriptHook({ url: "/firstqueue", callback: (content) => { let newContent = content; // 加一按钮 newContent = newContent.replace(`if(u&&u.isOpenFireFBComment)`, `if(true)`); // 回复按钮 newContent = newContent.replace(`if(W&&!this.isFireOpenRank(s))if(parseInt(W,10)&&U&&B>=z&&(!V||V&&M))`, `if(true)if(true) `); // 点赞按钮 newContent = newContent.replace(`else if(1==+Object(r.A)("barrage_praise"))`, `if(true) `); return newContent; } }); } function initPkg_Sign() { initPkg_Sign_Dom(); initPkg_Sign_Func(); } function initPkg_Sign_Func() { let dom = new CClick(document.getElementsByClassName("ex-sign")[0]); dom.click(() => { initPkg_Sign_Main(false); // 只签到开播的 }); dom.longClick(() => { initPkg_Sign_Main(true); // 全部签到 }); } function initPkg_Sign_Dom() { Sign_insertIcon(); } function Sign_insertIcon() { let a = document.createElement("div"); a.className = "ex-sign"; // 以免有同名冲突,加了ex- a.innerHTML = ''; let b = document.getElementsByClassName("ex-panel__wrap")[0]; b.insertBefore(a, b.childNodes[0]); } function initPkg_Sign_Main(isAll) { // 这里挂载每个子模块的函数入口 // 入口即为调用 initPkg_Sign_Yuba(); // 鱼吧签到 initPkg_Sign_Client(); // initPkg_Sign_Motorcade(); initPkg_Sign_Room(isAll); // initPkg_Sign_Ad_666(); // 此处移动到鱼塘鱼丸领取中去以免观看冲突 // initPkg_Sign_Ad_Sign(); // 2022年9月1日23:41:59 失效 // initPkg_Sign_Aoligei(); // initPkg_Sign_Ad_Yuba(); // initPkg_Sign_Bycc(); // saobai后每秒签到一个 // initPkg_Sign_Saobai(); // initPkg_Sign_Changzheng(); // initPkg_Sign_Chengxiao(); // initPkg_Sign_WuXuanyi(); // initPkg_Sign_1000(); // initPkg_Sign_Zhuli(); // initPkg_Sign_TV(); // 2022年9月1日23:41:59 失效 // initPkg_Sign_Yuba_Like(); // 2022年9月1日23:41:59 失效 // initPkg_Sign_Renlei(); initPkg_Sign_Act(); initPkg_Sign_ActqzsUserTask(); // initPkg_Sign_Bowuyuan(); // initPkg_Sign_ZBXSL2(); // initPkg_Sign_COD(); // initPkg_Sign_Wangzhe(); initPkg_Sign_ReadPosts(); initPkg_Sign_Follow(); initPkg_Sign_FansTree(); initPkg_Sign_SuperFans(); initPkg_Sign_OPFOY(); initPkg_Sign_AnchorStar(); } // function takeActPrize(name) { // // 关注20200911LMJX_T2 // // 分享20200911LMJX_T5 // return new Promise(resolve => { // 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=${ name }` // }).then(res => { // return res.json(); // }).then(ret => { // resolve(ret); // }).catch(err => { // console.log("请求失败!", err); // }) // }) // } // function addFollowRoom(rid) { // return new Promise(resolve => { // 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=${ rid }&ctn=${ getCCN() }` // }).then(res => { // return res.json(); // }).then(ret => { // resolve(ret); // }).catch(err => { // console.log("请求失败!", err); // }) // }) // } // function removeFollowRoom(rid) { // return new Promise(resolve => { // 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=${ rid }&ctn=${ getCCN() }` // }).then(res => { // return res.json(); // }).then(ret => { // resolve(ret); // }).catch(err => { // console.log("请求失败!", err); // }) // }) // } // function shareAct(name) { // // 20200911LMJX // return new Promise(resolve => { // 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=${ name }&token=${ dyToken }` // }).then(res => { // return res.json(); // }).then(ret => { // resolve(ret); // }).catch(err => { // console.log("请求失败!", err); // }) // }) // } // function getJackpot(id) { // return new Promise(resolve => { // fetch("https://www.douyu.com/japi/carnival/nc/lottery/jackpot", { // method: 'POST', // headers: {'Content-Type': 'application/json;charset=UTF-8'}, // body: `{"activityId":"${ id }","token":"${ dyToken }"}` // }).then(res => { // return res.json(); // }).then(ret => { // resolve(ret); // }) // }) // } // function getActRemaining(id) { // return new Promise(resolve => { // fetch("https://www.douyu.com/japi/carnival/nc/lottery/remaining?activityId=" + id, { // method: 'GET', // mode: 'no-cors', // credentials: 'include', // headers: {'Content-Type': 'application/json;charset=UTF-8'}, // }).then(res => { // return res.json(); // }).then(ret => { // resolve(ret); // }) // }) // } // 本地化的活动地址 // { // "version": "2021.01.29.01", // "data": [{ // "name": "斗鱼党宣", // "script": [{ // "name": "signAct", // "value": "XSDXZC" // }, { // "name": "getActRemaining", // "value": "610" // }] // }, // { // "name": "春节签到", // "script": [{ // "name": "doSign", // "value": "20210210lhqd" // }] // }, // ] // } let actList = {}; function initPkg_Sign_Act() { getAct(); } async function getAct() { // actList = JSON.parse(decodeURIComponent(escape(window.atob(actList))) || "{}"); if ("data" in actList == false) { return; } for (let i = 0; i < actList.data.length; i++) { let eachAct = actList.data[i]; let name = eachAct.name; for (let j = 0; j < eachAct.script.length; j++) { let script = eachAct.script[j]; let value = script.value; let ret; let ret2; switch (script.name) { case "signAct": ret = await signAct(value); if (ret.error == "0") { showMessage(`【${name}】签到完毕`, "success"); } else { showMessage(`【${name}】${ret.msg}`, "error"); } break; case "userStatus": ret = await userStatus(value); if (ret.error == 0) { for (let key in ret.data) { let item = ret.data[key]; let cnt = item.curCompleteNum - item.curDeliverNum; let name2 = name + "-" + item.taskName; for (let i = 0; i < cnt; i++) { let ret2 = await takeActPrize(key); if (ret2.error == "0") { showMessage(`【${name2}】获得` + ret2.data.sendRes.items[0].prizeName + "*" + ret2.data.sendRes.items[0].prizeNum, "success"); } else { showMessage(`【${name2}】${ret2.msg}`, "error"); } } } } break; case "addFollowRoom": await addFollowRoom(value); break; case "removeFollowRoom": await removeFollowRoom(value); break; case "shareAct": await shareAct(value); break; case "doSign": await doSign(value); break; case "getActRemaining": ret = await getActRemaining(value); if (ret.error == "0") { for (let i = 0; i < ret.data.freeCount; i++) { ret2 = await getJackpot(value); if (ret2.error == "0") { showMessage(`【${name}】礼盒开启:${ret2.data.giftName}`, "success"); } } } default: break; } } } } async function initPkg_Sign_ActqzsUserTask() { const rids = ["5189167", "290935", "6979222", "5132174", "4042402"]; let activityId = await getActivityId(dateFormat("yyyyMM", new Date())); if (!activityId) { const currentDate = new Date(); const nextMonth = currentDate.getMonth() + 1; const prevMonth = currentDate.getMonth() - 1; const prevMonthDate = new Date(currentDate.getFullYear(), prevMonth, 1); const nextMonthDate = new Date(currentDate.getFullYear(), nextMonth, 1); activityId = await getActivityId(dateFormat("yyyyMM", prevMonthDate)); if (!activityId) { activityId = await getActivityId(dateFormat("yyyyMM", nextMonthDate)); } } let cardArenaId = await getCardArenaId(dateFormat("yyyyMM", new Date())); if (!cardArenaId) { const currentDate = new Date(); const nextMonth = currentDate.getMonth() + 1; const prevMonth = currentDate.getMonth() - 1; const prevMonthDate = new Date(currentDate.getFullYear(), prevMonth, 1); const nextMonthDate = new Date(currentDate.getFullYear(), nextMonth, 1); cardArenaId = await getCardArenaId(dateFormat("yyyyMM", prevMonthDate)); if (!cardArenaId) { cardArenaId = await getCardArenaId(dateFormat("yyyyMM", nextMonthDate)); } } const actIds = [activityId, cardArenaId]; for (const actId of actIds) { for (const rid of rids) { const signinActRet = await signinAct(actId, rid); if (signinActRet.error == 0) { let gift = signinActRet.data.awards.map(item => `${item.name}x${item.num}`).join("、"); showMessage("【一键签到】右侧活动直播间已签到,获得" + gift, "success"); } const signinCardArenaRet = await signinCardArena(actId, rid); if (signinCardArenaRet.error == 0) { let gift = signinCardArenaRet.data.awards.map(item => `${item.name}x${item.num}`).join("、"); showMessage("【一键签到】右侧活动直播间已签到,获得" + gift, "success"); } } } } function getActivityId(dateStr) { return new Promise((resolve) => { fetch(`https://webconf.douyucdn.cn/resource/common/activity/actqzs${dateStr}_w.json`) .then((res) => { return res.text(); }) .then((ret) => { let json = ret.substring( String("DYConfigCallback(").length, ret.length ); json = json.substring(0, json.lastIndexOf(")")); try { json = JSON.parse(json); resolve(json.data.activity_setting.activity_id); } catch (err) { resolve(null); } }) .catch((err) => { resolve(null); }); }); } function getCardArenaId(dateStr) { return new Promise((resolve) => { fetch(`https://webconf.douyucdn.cn/resource/common/activity/cardArena${dateStr}_w.json`) .then((res) => { return res.text(); }) .then((ret) => { let json = ret.substring( String("DYConfigCallback(").length, ret.length ); json = json.substring(0, json.lastIndexOf(")")); try { json = JSON.parse(json); resolve(json.data.activity_setting.activity_id); } catch (err) { resolve(null); } }) .catch((err) => { resolve(null); }); }); } function signinCardArena(activityId, rid) { return new Promise((resolve, reject) => { fetch("https://www.douyu.com/japi/revenuenc/web/cardArena/userTask/signIn", { method: 'POST', mode: 'no-cors', credentials: 'include', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: `ctn=${getCCN()}&activity_id=${activityId}&rid=${rid}` }).then(res => { return res.json(); }).then(ret => { resolve(ret); }).catch(err => { console.log("请求失败!", err); reject(err); }) }) } function signinAct(activityId, rid) { return new Promise((resolve, reject) => { fetch("https://www.douyu.com/japi/revenuenc/web/actqzs/userTask/signIn", { method: 'POST', mode: 'no-cors', credentials: 'include', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: `ctn=${getCCN()}&activity_id=${activityId}&rid=${rid}` }).then(res => { return res.json(); }).then(ret => { resolve(ret); }).catch(err => { console.log("请求失败!", err); reject(err); }) }) } function initPkg_Sign_Ad_Sign() { getFishBall_Ad_Sign(); } function getFishBall_Ad_Sign() { let fishBallNum = "0"; let posid_ad_sign = "1064246"; GM_xmlhttpRequest({ method: "GET", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/inspire/getFishBallNum?posId=" + posid_ad_sign + "&ct=1&token=" + dyToken, responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { fishBallNum = ret.data.num; GM_xmlhttpRequest({ method: "GET", url: "https://apiv2.douyucdn.cn/japi/inspire/api/ad/inspire/sendFishBall?uid=" + getUID() + "&posCode=" + posid_ad_sign + "&ct=1&token=" + dyToken, responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.error == "0") { showMessage("【签到鱼丸】成功领取" + fishBallNum + "个鱼丸", "success"); } else { if (ret.msg == "null") { showMessage("【签到鱼丸】未绑定手机" , "warning"); } else { showMessage("【签到鱼丸】" + ret.msg, "warning"); } } } }); } } }); } async function initPkg_Sign_AnchorStar() { const roomListRes = await getAnchorStarRoomList().catch(() => {}); const roomList = roomListRes.data.rankItemList; if (!roomList || (roomList && roomList.length == 0)) return; for (let i = 0; i < 3; i++) { const rid = roomList[i].rid; if (!rid) continue; await signAnchorStar(rid); await sleep(500); } showMessage("【星推】签到任务完成", "success"); for (let i = 0; i < 5; i++) { const rid = roomList[i].rid; if (!rid) continue; const res = await addFollowRoom(rid); await sleep(500); if (res.error == 1) { // 已关注(再关注回来) await removeFollowRoom(rid); await sleep(500); await addFollowRoom(rid); } else { await removeFollowRoom(rid); } await sleep(500); } showMessage("【星推】关注任务完成", "success"); } function getAnchorStarRoomList() { return new Promise((resolve, reject) => { fetch(`https://www.douyu.com/japi/livebiznc/web/anchorstardiscover/rank/info?rid=${rid}&type=5&track=3`, { method: "GET", mode: "no-cors", credentials: "include" }) .then((res) => { return res.json(); }) .then((ret) => { resolve(ret); }) .catch((err) => { console.log("请求失败!", err); reject(err); }); }); } function signAnchorStar(rid) { return new Promise((resolve, reject) => { fetch("https://www.douyu.com/japi/livebiznc/web/anchorstardiscover/user/task/report", { method: "POST", mode: "no-cors", credentials: "include", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: `ctn=${getCCN()}&type=5&rid=${rid}` }) .then((res) => { return res.json(); }) .then((ret) => { resolve(ret); }) .catch((err) => { console.log("请求失败!", err); reject(err); }); }); } function initPkg_Sign_Client() { signClient(); } function signClient() { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/h5nc/sign/sendSign", data: 'token=' + dyToken, responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; if (ret.data.length == 0) { showMessage("【客户端】今日已签到", "warning"); // console.log("【客户端】今日已签到"); } else { if (ret.data.sign_pl.length != 0) { let recv = ""; for (let i = 0; i < ret.data.sign_pl.length; i++) { recv = recv + ret.data.sign_pl[i].cnt + "个" + ret.data.sign_pl[i].name + ","; } showMessage("【客户端】签到成功! 获得物品:" + recv, "success"); // console.log("【客户端】签到成功! 获得物品:" + recv); } else { showMessage("【客户端】签到成功! 可惜没有获得东西", "success"); // console.log("【客户端】签到成功! 可惜没获得东西"); } } } }); } async function initPkg_Sign_FansTree() { for (let i = 0; i < myFansBadgeList.length; i++) { const roomId = myFansBadgeList[i]; let ret = await signRoomTree(roomId); if (ret.error !== 0) { showMessage(`【粉丝家园】${roomId}${ret.msg}`, "error"); } else { showMessage(`【粉丝家园】${roomId}签到成功!`, "success"); } } } function signRoomTree(rid) { return new Promise((resolve, reject) => { 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=${rid}` }).then(res => { return res.json(); }).then(ret => { resolve(ret); }).catch(err => { console.log("请求失败!", err); reject(err); }) }) } async function initPkg_Sign_Follow() { // 此处为了完成斗鱼等级任务 const room_id = "3186571"; await followRoom(room_id); await unfollowRoom(room_id); } function unfollowRoom(rid) { return new Promise((resolve, reject) => { 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: `ctn=${getCCN()}&rid=${rid}` }).then(res => { return res.json(); }).then(ret => { resolve(ret); }).catch(err => { console.log("请求失败!", err); reject(err); }) }) } function followRoom(rid) { return new Promise((resolve, reject) => { 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: `ctn=${getCCN()}&rid=${rid}` }).then(res => { return res.json(); }).then(ret => { resolve(ret); }).catch(err => { console.log("请求失败!", err); reject(err); }) }) } function initPkg_Sign_Motorcade() { signMotorcade(); } function signMotorcade() { openPage("https://msg.douyu.com/motorcade/#/motorcade/list/recommend?exid=chun", false); } function getCookie(cookieName) { let csrfToken = ""; let strCookie = document.cookie; let arrCookie = strCookie.split("; "); for(let i = 0; i < arrCookie.length; i++) { let arr = arrCookie[i].split("="); if(cookieName == arr[0]){ csrfToken = arr[1]; } } if(csrfToken == ""){ csrfToken = Math.random().toString(36).substr(2); document.cookie = "post-csrfToken="+ escape(csrfToken)+";path=/"; } return csrfToken; } async function signMotorcade_Sign() { let retConnect = await motorcadeConnect(); let retConnect2 = await motorcadeConnect2(retConnect.data.uid, retConnect.data.sig); let mid = await getMotorcadeID(retConnect2.TinyId, retConnect2.A2Key, retConnect.data.uid); if (!mid || mid == "") { closePage(); return; } console.log("mid是:", mid); mid = encodeURIComponent(mid); GM_xmlhttpRequest({ method: "GET", url: 'https://msg.douyu.com/v3/motorcade/signs/weekly?mid=' + mid + '×tamp=' + Math.random().toFixed(17), responseType: "json", headers: { 'dy-device-id':'-', "dy-client": "web", "dy-csrf-token":getCookie("post-csrfToken"), 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { let ret = response.response; console.log("weekly:", ret); if (ret.data.is_sign == "1") { closePage(); } else { GM_xmlhttpRequest({ method: "POST", url: 'https://msg.douyu.com/v3/msign/add?timestamp=' + Math.random().toFixed(17), data: "to_mid="+ mid +"&expression=" + String(Number(ret.data.total) + 1), responseType: "json", headers: { 'dy-device-id':'-', "dy-client": "web", "dy-csrf-token":getCookie("post-csrfToken"), 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { if (Math.floor(response.response.status_code / 100) == 2){ console.log("【车队】签到成功") } else { console.log(response.response.message); } closePage(); } }); } } }); } function motorcadeConnect() { return new Promise(resolve => { GM_xmlhttpRequest({ method: "GET", url: 'https://msg.douyu.com/v3/login/getusersig?t=' + String(new Date().getTime()) + '×tamp=' + Math.random().toFixed(17), data: '{"State":"Online"}', responseType: "json", headers: { 'dy-device-id':'-', "dy-client": "web", "dy-csrf-token":getCookie("post-csrfToken"), 'Content-Type': 'application/x-www-form-urlencoded' }, onload: function(response) { resolve(response.response); } }); }) } function motorcadeConnect2(identifier, sig) { let url = "https://webim.tim.qq.com/v4/openim/login?identifier=" + identifier + "&usersig=" + sig +"&contenttype=json&sdkappid=1400029396"; return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: url, data: '{"State":"Online"}', responseType: "json", headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", }, onload: function(response) { resolve(response.response); } }); }) } function getMotorcadeID(tinyid, a2, identifier) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://webim.tim.qq.com/v4/group_open_http_svc/get_joined_group_list?tinyid=" + tinyid + "&a2=" + a2 + "&contenttype=json&sdkappid=1400029396", data: '{"Member_Account":"' + identifier + '"}', responseType: "json", headers: { "Content-Type": "application/x-www-form-urlencoded" }, onload: function(response) { if (response.response.GroupIdList && response.response.GroupIdList.length > 0) { resolve(response.response.GroupIdList[0].GroupId); } else { resolve(""); } } }); }) } async function initPkg_Sign_OPFOY() { const csrfToken = await getCsrfToken(); const ret = await signOPFOY(csrfToken); if (ret.error == 0 || ret.error == 31200) { showMessage(`【积分任务】${ret.msg}`, "success"); } else { showMessage(`【积分任务】${ret.msg}`, "error"); } } function signOPFOY(csrfToken) { return new Promise((resolve, reject) => { fetch("https://www.douyu.com/japi/carnivalApi/sign/doSign", { method: "POST", mode: "no-cors", credentials: "include", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: `csrfToken=${csrfToken}&signAlias=20250521OPFOY_qd2&useJiYan=false` }) .then((res) => { return res.json(); }) .then((ret) => { resolve(ret); }) .catch((err) => { console.log("请求失败!", err); reject(err); }); }); } function initPkg_Sign_OPFOY_Timer() { checkOPFOYViewStatus(); setInterval(checkOPFOYViewStatus, 5 * 60 * 1000); } async function checkOPFOYViewStatus() { const status = await getOPFOYViewStatus(); const taskList = status.data.taskList; const startTime = status.data.startTime; if (!taskList) return; for (const id in taskList) { const task = taskList[id]; if (task.status !== 2) continue; const ret = await getOPFOYGift(id, startTime); if (ret.error == 0) { showMessage(`【积分任务】观时积分领取成功`, "success"); } else { showMessage(`【积分任务】${ret.msg}`, "error"); } } } function getOPFOYViewStatus() { return new Promise((resolve, reject) => { fetch("https://www.douyu.com/wgapi/activitync/gametask/viewStatus", { method: "POST", mode: "no-cors", credentials: "include", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: `ctn=${getCCN()}&actAlias=20250521OPFOY` }) .then((res) => { return res.json(); }) .then((ret) => { resolve(ret); }) .catch((err) => { console.log("请求失败!", err); reject(err); }); }); } function getOPFOYGift(id, startTime) { return new Promise((resolve) => { fetch("https://www.douyu.com/wgapi/activitync/gametask/takeGift", { method: "POST", mode: "no-cors", credentials: "include", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: `ctn=${getCCN()}&id=${id}&actAlias=20250521OPFOY&startTime=${startTime}` }) .then((res) => { return res.json(); }) .then((ret) => { resolve(ret); }) .catch((err) => { console.log("请求失败!", err); }); }); } async function initPkg_Sign_ReadPosts() { const counts = 5; for (let i = 0; i < counts; i++) { await readPosts(); await sleep(2000); } } function readPosts() { GM_xmlhttpRequest({ method: "GET", url: "https://yuba.douyu.com/wbapi/web/post/detail/555691541586843641?cid=×tamp=" + new Date().getTime(), responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded', "dy-token": dyToken, "dy-client": "pc" }, onload: function(response) { } }); } function initPkg_Sign_Room(isAll) { signAllRoom(isAll); } function signAllRoom(isAll) { // 1. get page counts(1428) // 2. for in all pages // 3. sign each room let pageCount = 0; let signedCount = 0; let count = 0; fetch('https://www.douyu.com/wgapi/livenc/liveweb/follow/list?page=1428',{ method: 'GET', mode: 'no-cors', cache: 'default', credentials: 'include', }).then(res => { return res.json(); }).then(ret => { pageCount = Number(ret.data.pageCount); for (let nowPage = 1; nowPage <= pageCount; nowPage++) { fetch('https://www.douyu.com/wgapi/livenc/liveweb/follow/list?page=' + String(nowPage),{ method: 'GET', mode: 'no-cors', cache: 'default', credentials: 'include', }).then(res => { return res.json(); }).then(ret1 => { let roomCount = Number(ret1.data.list.length); for (let i = 0; i < roomCount; i++) { if (isAll == false) { if (ret1.data.list[i].show_status == "1") { signRoom(ret1.data.list[i].room_id); signedCount++; } } else { signRoom(ret1.data.list[i].room_id); signedCount++; } count++; if (count == ret1.data.total && i == roomCount - 1) { let rest = Number(ret1.data.total) - signedCount; showMessage("【房间签到】" + String(signedCount) + "个房间签到已完成," + String(rest) + "个房间未签到", "success"); } } }).catch(err => { console.log("请求失败!", err); }) } showMessage("【房间签到】" + ret.data.total + "个房间正在签到中...", "info"); }).catch(err => { console.log("请求失败!", err); }) } function signRoom(r) { GM_xmlhttpRequest({ method: "POST", url: "https://apiv2.douyucdn.cn/japi/roomuserlevel/apinc/checkIn?client_sys=android", data: 'rid=' + r, responseType: "json", headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'token': dyToken, 'aid': 'android1' }, onload: function(response) { } }); } async function initPkg_Sign_SuperFans() { for (let i = 0; i < myFansBadgeList.length; i++) { const roomId = myFansBadgeList[i]; let ret = await signSuperFans(roomId); if (ret.error !== 0) { // showMessage(`【钻粉联赛签到】${roomId}${ret.msg}`, "error"); } else { showMessage(`【钻粉联赛签到】${roomId}签到成功!`, "success"); } } } function signSuperFans(rid) { return new Promise((resolve, reject) => { fetch("https://www.douyu.com/japi/interactnc/web/dfansact/userSign", { method: 'POST', mode: 'no-cors', credentials: 'include', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: `ctn=${getCCN()}&rid=${rid}` }).then(res => { return res.json(); }).then(ret => { resolve(ret); }).catch(err => { console.log("请求失败!", err); reject(err); }) }) } function initPkg_Sign_TV() { signTV(); } function signTV() { let did = window.btoa(getDyDid()); GM_xmlhttpRequest({ method: "GET", url: "https://apitv.douyucdn.cn/user/sign/index?token=" + dyToken + "&client_sys=android", responseType: "json", headers: { 'User-Device': did }, onload: function(response) { let ret = response.response; if (ret.error == "0") { showMessage("【电视端】签到成功!获得100鱼丸", "success"); } else { showMessage("【电视端】" + ret.data.msg, "warning"); } } }); } let signedYuba = 0; let totalYuba = 0; let doneYuba = 0; let signCountMap = {}; function initPkg_Sign_Yuba() { signYubaList(); } function signYubaFast() { GM_xmlhttpRequest({ method: "POST", url: "https://mapi-yuba.douyu.com/wb/v3/fastSign", responseType: "json", headers: { "Content-Type": "application/x-www-form-urlencoded", "client": "android", "token": dyToken, }, onload: function (response) { if (response.response.message == "" && response.response.data != 0) { // showMessage("【鱼吧】一键签到成功! 获得经验" + response.response.data, "success"); // console.log("【极速鱼吧】" + group_id + "签到成功! 连续" + response.response.data.count + "天 获得经验" + response.response.data.exp); } else if (response.response.data == 0) { // showMessage("【鱼吧】没有7级以上的鱼吧或极速签到已完成", "warning"); // console.log("【极速鱼吧】" + group_id + response.response.message); } else { // showMessage("【鱼吧】" + response.response.message, "warning"); // console.log("【极速鱼吧】" + response.response.message); } } }); } async function signYuba(group_id, t) { GM_xmlhttpRequest({ method: "POST", url: "https://yuba.douyu.com/ybapi/topic/sign", data: 'group_id=' + group_id, responseType: "json", headers: { "Content-Type": "application/x-www-form-urlencoded", "dy-client": "pc", "dy-token": t, 'Referer': 'https://yuba.douyu.com/group/' + group_id }, onload: async function (response) { if (signCountMap[group_id] >= 10) { return; } if (response.response.message == "签到失败") { await sleep(2000); signYuba(group_id, t); return; } if (signCountMap[group_id]) { signCountMap[group_id]++; } else { signCountMap[group_id] = 1; } doneYuba++; if (response.response.message == "") { signedYuba++; // showMessage("【鱼吧】" + group_id + "签到成功! 连续" + response.response.data.count + "天 获得经验" + response.response.data.exp, "success"); // console.log("【鱼吧】" + group_id + "签到成功! 连续" + response.response.data.count + "天 获得经验" + response.response.data.exp); } else { // showMessage("【鱼吧】" + group_id + response.response.message, "warning"); // console.log("【鱼吧】" + group_id + response.response.message); } signYubaSupplementary(group_id); if (doneYuba == totalYuba) { // 完成全部签到 if (signedYuba > 0) { if (totalYuba - signedYuba == 0) { showMessage("【鱼吧】" + String(signedYuba) + "个鱼吧签到完成", "success") } else { showMessage("【鱼吧】" + String(signedYuba) + "个鱼吧签到完成," + String(totalYuba - signedYuba) + "个鱼吧已签到", "success"); } } else { showMessage("【鱼吧】"+ String(totalYuba) + "个鱼吧已签到", "warning"); } signedYuba = null; totalYuba = null; doneYuba = null; } } }); } async function signYubaSupplementary(group_id) { let result = await signSupplementary(group_id); for (let i = 0; i < result.data.supplementary_cards; i++) { await signSupplementary(group_id); } } async function signYubaList() { let yubaList = []; let ret = await getYubaPage(1); yubaList = yubaList.concat(ret.list); let pageNum = Number(ret.count_page) - 1; if (pageNum >= 1) { for (let i = 0; i < pageNum; i++) { let curPage = 2 + i; ret = await getYubaPage(curPage); yubaList = yubaList.concat(ret.list); } } totalYuba = yubaList.length; signYubaFast(); for (let i = 0; i < yubaList.length; i++) { signYuba(yubaList[i].group_id, dyToken); } } function getYubaPage(page) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "GET", url: "https://yuba.douyu.com/wbapi/web/group/myFollow?page=" + String(page) + "&limit=30", responseType: "json", headers: { "Content-Type": "application/x-www-form-urlencoded", "dy-client": "pc", "dy-token": dyToken }, onload: function(response) { resolve(response.response.data) } }); }) } function getSupplementaryNums(group_id) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "GET", url: "https://yuba.douyu.com/wbapi/web/signDetail?group_id=" + group_id, responseType: "json", headers: { "Content-Type": "application/x-www-form-urlencoded", "dy-client": "pc", "dy-token": dyToken }, onload: function(response) { resolve(response.response); } }); }) } function signSupplementary(group_id) { return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://mapi-yuba.douyu.com/wb/v3/supplement", responseType: "json", headers: { "Content-Type": "application/x-www-form-urlencoded", "client": "android", "token": dyToken, }, data: "group_id=" + group_id, onload: function(response) { resolve(response.response); } }); }) } function initPkg_Sign_Yuba_Like() { likeYuba(); } function likeYuba() { let pid = "555691541586843641"; // likeYubaPostComment(pid, "1483548421625277411", "-1").then(() => {likeYubaPostComment(pid, "1483548421625277411", "1")}); // likeYubaPostComment(pid, "1483548421625277411", "-1").then(() => {likeYubaPostComment(pid, "1483548421625277411", "1")}); // likeYubaPostComment(pid, "1482171839375552044", "-1").then(() => {likeYubaPostComment(pid, "1482171839375552044", "1")}); // likeYubaPostComment(pid, "1481389816302095706", "-1").then(() => {likeYubaPostComment(pid, "1481389816302095706", "1")}); // likeYubaPostComment(pid, "1470603012833589758", "-1").then(() => {likeYubaPostComment(pid, "1470603012833589758", "1")}); likeYubaPost(pid, "-1").then(() => {likeYubaPost(pid, "1")}); showMessage("【鱼吧点赞】已完成", "success"); } function likeYubaPostComment(post_id, commnet_id, type) { let data = `pid=${ post_id }&comment_id=${ commnet_id }&type=${ type }`; return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://yuba.douyu.com/ybapi/follow/like", data: data, responseType: "json", headers: { "dy-token": dyToken, "dy-client": "pc", "Content-Type": "application/x-www-form-urlencoded", "Referer": "https://yuba.douyu.com/p/555691541586843641" }, onload: function(response) { let ret = response.response; resolve(ret); } }); }) } function likeYubaPost(post_id, type) { let data = `pid=${ post_id }&type=${ type }`; return new Promise(resolve => { GM_xmlhttpRequest({ method: "POST", url: "https://yuba.douyu.com/ybapi/follow/like", data: data, responseType: "json", headers: { "dy-token": dyToken, "dy-client": "pc", "Content-Type": "application/x-www-form-urlencoded", "Referer": "https://yuba.douyu.com/p/" + post_id }, onload: function(response) { let ret = response.response; resolve(ret); } }); }) } var _hmt = _hmt || []; function initPkg_Statistics() { let hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?4dc4fb0549a56fe03ba53c022b1ff455"; let s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); } function initPkg_SyncJoy() { initPkg_SyncJoy_Dom(); initPkg_SyncJoy_Func(); } function initPkg_SyncJoy_Dom() { SyncJoy_insertIcon(); } function SyncJoy_insertIcon() { let a = document.createElement("div"); a.className = "ex-syncjoy"; a.innerHTML = ''; let b = document.getElementsByClassName("ex-panel__wrap")[0]; b.insertBefore(a, b.childNodes[0]); } function initPkg_SyncJoy_Func() { document.getElementsByClassName("ex-syncjoy")[0].addEventListener("click", function() { openPage("https://sb.douyuex.com/"); }); } // 版本号 // 格式 yyyy.MM.dd.** var curVersion = "2025.11.27.01" var isNeedUpdate = false var lastestVersion = "" function initPkg_Update() { initPkg_Update_Dom(); initPkg_Update_Func(); // Update_checkVersion(); // 首次检查更新 if (isNeedUpdate) { Update_showTip(true); } } function initPkg_Update_Dom() { Update_insertIcon(); } function Update_insertIcon() { let a = document.createElement("div"); a.className = "ex-update"; a.innerHTML = ''; let b = document.getElementsByClassName("ex-panel__wrap")[0]; b.insertBefore(a, b.childNodes[0]); } function initPkg_Update_Func() { document.getElementsByClassName("ex-update")[0].addEventListener("click", Update_openUpdatePage); } function checkUpdate_Src() { return new Promise((resolve, reject) => { GM_xmlhttpRequest({ method: "GET", url: `https://src.douyuex.com/src/douyuex_version.txt?t=${new Date().getTime()}`, responseType: "text", onload: function(response) { const txt = response.response; if(txt != undefined){ if (txt != curVersion) { resolve([true, txt]); } } resolve(false); }, onerror: function(err) { console.error('请求失败', err); reject(); } }); }) } function checkUpdate_GreasyFork() { return new Promise((resolve, reject) => { fetch('https://greasyfork.org/zh-CN/scripts/394497',{ method: 'GET', mode: 'cors', cache: 'no-store', credentials: 'omit', }).then(res => { return res.text(); }).then(txt => { txt = (new DOMParser()).parseFromString(txt, 'text/html'); let v = txt.getElementsByClassName("script-show-version")[1]; if(v != undefined){ if (v.innerText != curVersion) { resolve([true, v.innerText]); } } resolve(false); }).catch(err => { console.error('请求失败', err); reject(); }) }) } async function Update_checkVersion(isShowNotUpdate = false) { // 用解构赋值会导致函数undefined,暂不知原因 let tmp = []; tmp = await checkUpdate_Src().catch(err => { tmp = [false, curVersion]; isNeedUpdate = tmp[0]; lastestVersion = tmp[1]; if (isNeedUpdate) { Update_showMessage(); if (isNeedUpdate) { Update_showTip(true); } } else { if (isShowNotUpdate) { showMessage(`【版本更新】当前版本${curVersion}已为最新,点击查看更新内容`, "success") } } }) isNeedUpdate = tmp[0]; lastestVersion = tmp[1]; if (isNeedUpdate) { Update_showMessage(); if (isNeedUpdate) { Update_showTip(true); } } else { if (isShowNotUpdate) { showMessage(`【版本更新】当前版本${curVersion}已为最新,点击查看更新内容`, "success") } } } function Update_openUpdatePage() { openPage("https://html.douyuex.com/install/web.html", true); } function Update_showTip(a) { let d = document.getElementById("ex-update__tip"); if (d) { if (a) { if (d.style.display != "block") { d.style.display = "block"; } } else { d.style.display = "none"; } } } function Update_showMessage() { let msg = `【版本更新】最新版本:${lastestVersion},点击官方源或者GreasyFork源更新,点击查看更新内容` showMessage(msg, "error", { timeout: 50, }); } let videoStartTime = 0; let videoTime_domhook_videoChange = null; let videoTime_domhook_showtime = null; let videoTime_timeout = 0; function initPkg_VideoTime() { let timer = setInterval(() => { VideoTime_setData(); let videoDom = document.getElementsByTagName("demand-video")[0].shadowRoot.getElementById("__video"); let showtimeDom = document.getElementsByTagName("demand-video")[0].shadowRoot.getElementById("demandcontroller-bar").shadowRoot.querySelector("demand-video-controller-progress").shadowRoot.querySelector("demand-video-controller-preview"); if (videoDom !== undefined && videoDom !== null) { clearInterval(timer); videoTime_domhook_videoChange = new MutationObserver(function(mutations) { VideoTime_setData(); }); videoTime_domhook_videoChange.observe(videoDom, { attributes: true, childList: true, subtree: false }); videoTime_domhook_showtime = new MutationObserver(function(mutations) { for (let i = 0; i < mutations.length; i++) { let item = mutations[i]; if (item.attributeName == "showtime") { // 此时修改时间 let showtime = Number(VideoTime_getShowTime()); VideoTime_setShowTime(String(dateFormat("yyyy-MM-dd hh:mm:ss", new Date(Number(videoStartTime + showtime * 1000)))) + "滤镜