直播世界播放助手

B站直播世界直播间播放助手,交流QQ群:232530228,直播间网址:https://live.bilibili.com/7399897

  1. // ==UserScript==
  2. // @name 直播世界播放助手
  3. // @name:zh 直播世界播放助手
  4. // @name:zh 直播世界播放助手
  5. // @name:zh-TW 直播世界播放助手
  6. // @namespace http://tampermonkey.net/
  7. // @version 1.03
  8. // @description B站直播世界直播间播放助手,交流QQ群:232530228,直播间网址:https://live.bilibili.com/7399897
  9. // @description:zh B站直播世界直播间播放助手,交流QQ群:232530228,直播间网址:https://live.bilibili.com/7399897
  10. // @description:zh-CN B站直播世界直播间播放助手,交流QQ群:232530228,直播间网址:https://live.bilibili.com/7399897
  11. // @description:zh-TW B站直播世界直播間播放助手,交流QQ群:232530228,直播間網址:https://live.bilibili.com/7399897
  12. // @author 星子弈风
  13. // @match *://live.bilibili.com/7399897*
  14. // @match *://space.bilibili.com/7619276*
  15. // @match *://live.bilibili.com/7399898*
  16. // @icon https://space.bilibili.com/favicon.ico
  17. // @grant none
  18. // ==/UserScript==
  19.  
  20. (function() {
  21. 'use strict';
  22.  
  23. console.log(window.location.host);
  24. if(window.location.host == 'live.bilibili.com'){
  25. var playerFinished = false; //播放器是否处理
  26. var liveStatusFinished = false; //直播窗台是否处理
  27. for (let i = 0; i <= 50; i++) {
  28. setTimeout(() => {
  29. //console.log(`#${i}`);
  30. if(!liveStatusFinished)
  31. { //没有处理过直播状态
  32. 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");
  33. if(liveStatus && liveStatus.innerText.length > 0){
  34. if(liveStatus.innerText == "直播"){
  35. return; //正在直播直接返回
  36. } else{
  37. liveStatus.style = "color: var(--brand_blue);";
  38. liveStatus.innerText = "直播";
  39. var area = document.querySelector("#head-info-vm > div > div > div.upper-row > div.left-ctnr.left-header-area > div.live-area > a");
  40. if(area){
  41. area.innerText = "户外";
  42. }
  43. }
  44. liveStatusFinished = true;
  45. console.log("liveStatusFinished");
  46. }
  47. }
  48. if(!playerFinished)
  49. { //直播状态已处理 && 没有处理过播放器
  50. var playerPanel = document.querySelector("#live-player > div.web-player-ending-panel");
  51. if(playerPanel && playerPanel.innerHTML.length > 0){
  52. playerPanel.innerHTML = `<iframe src='https://worldlive.org.cn:8443/live.html' width='${playerPanel.clientWidth}' height='${playerPanel.clientHeight}' scrolling='no' style='border:0;background:none;' allowfullscreen></iframe>`;
  53. playerFinished = true;
  54. console.log("playerFinished");
  55. return;
  56. }
  57. }
  58. }, 100 * i)
  59. }
  60. } else if(window.location.host == 'space.bilibili.com'){
  61. var finished = false;
  62. for (let i = 0; i <= 50; i++) {
  63. setTimeout(() => {
  64. //console.log(`#${i}`);
  65. if(!finished)
  66. {
  67. var tip = document.querySelector("#page-index > div.col-2 > div.section.i-live > div > div.i-live-off.i-live-off-guest > div > p");
  68. if(tip && tip.innerText.length > 0){
  69. tip.innerText = '🔴正在直播中,点击下方链接观看';
  70. finished = true;
  71. console.log("finished");
  72. return;
  73. }
  74. }
  75. }, 100 * i)
  76. }
  77. }
  78. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址