您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
B站直播世界直播间播放器,交流QQ群:232530228,直播间网址:https://live.bilibili.com/7399897
当前为
// ==UserScript== // @name 直播世界播放器 // @name:zh 直播世界播放器 // @name:zh-CN 直播世界播放器 // @name:zh-TW Userscript+ : 顯示當前網站所有可用的UserJS腳本 Jaeger // @namespace http://tampermonkey.net/ // @version 0.5 // @description B站直播世界直播间播放器,交流QQ群:232530228,直播间网址:https://live.bilibili.com/7399897 // @description:zh B站直播世界直播间播放器,交流QQ群:232530228,直播间网址:https://live.bilibili.com/7399897 // @description:zh-CN B站直播世界直播间播放器,交流QQ群:232530228,直播间网址:https://live.bilibili.com/7399897 // @description:zh-TW B站直播世界直播間播放器,交流QQ群:232530228,直播間網址:https://live.bilibili.com/7399897 // @author 星子弈风 // @match *://live.bilibili.com/7399897* // @match *://live.bilibili.com/7399898* // @match *://space.bilibili.com/7619276* // @icon https://space.bilibili.com/favicon.ico // @grant none // ==/UserScript== (function() { 'use strict'; console.log(window.location.host); if(window.location.host == 'live.bilibili.com'){ var playerFinished = false; //播放器是否处理 var liveStatusFinished = false; //直播窗台是否处理 for (let i = 0; i <= 10; i++) { setTimeout(() => { console.log(`#${i}`); if(!liveStatusFinished) { //没有处理过直播状态 var liveStatus = document.querySelector("#head-info-vm > div > div > div.upper-row > div.left-ctnr.left-header-area > div.live-status.live-skin-highlight-text.live-skin-highlight-border"); if(liveStatus && liveStatus.innerText.length > 0){ if(liveStatus.innerText == "直播"){ return; //正在直播直接返回 } else{ liveStatus.style = "color: var(--brand_blue);"; liveStatus.innerText = "直播"; var area = document.querySelector("#head-info-vm > div > div > div.upper-row > div.left-ctnr.left-header-area > div.live-area > a"); if(area){ area.innerText = "户外"; } } liveStatusFinished = true; console.log("liveStatusFinished"); } } if(!playerFinished) { //没有处理过播放器 var playerPanel = document.querySelector("#live-player > div.web-player-ending-panel"); if(playerPanel && playerPanel.innerHTML.length > 0){ playerPanel.innerHTML = `<iframe src='https://lightkitty.cn:8443/live.html' width='${playerPanel.clientWidth}' height='${playerPanel.clientHeight}' scrolling='no' style='border:0;background:none;' allowfullscreen></iframe>`; playerFinished = true; console.log("playerFinished"); return; } } }, 500 * i) } } else if(window.location.host == 'space.bilibili.com'){ var finished = false; //播放器是否处理 for (let i = 0; i <= 10; i++) { setTimeout(() => { console.log(`#${i}`); if(!finished) { //没有处理过播放器 var playerPanel = document.querySelector("#page-index > div.col-2 > div.section.i-live > h3"); if(playerPanel && playerPanel.innerText.length > 0){ playerPanel.innerText = '🔴直播间正在直播,点击下方进入👇'; finished = true; console.log("finished"); return; } } }, 500 * i) } } })();