LOL S10 二路流合成

企鹅直播77777二路流

  1. // ==UserScript==
  2. // @name LOL S10 二路流合成
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 企鹅直播77777二路流
  6. // @author DKing
  7. // @match https://egame.qq.com/77777
  8. // @match https://egame.qq.com/367958257*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12.  
  13.  
  14. function set_second_frame() {
  15. if (window.location.pathname == "/367958257") {
  16. // mute
  17. let vol = document.getElementsByClassName("vcp-volume-icon")[0];
  18. if (!vol.parentElement.classList.contains("vcp-volume-muted"))
  19. vol.click();
  20. // disable danmuku
  21. let danmuku = document.getElementsByClassName("vcp-extended-barrage")[0];
  22. if (!danmuku.parentElement.classList.contains("hide"))
  23. danmuku.click();
  24. // clean junk elems
  25. let second_frame_all = document.getElementById('__nuxt');
  26. var second_video = document.getElementsByClassName('ui-video live-player')[0];
  27. second_frame_all.innerHTML = '';
  28. second_frame_all.appendChild(second_video);
  29. }
  30. }
  31.  
  32. function load_second_frame() {
  33. if (window.location.pathname == "/77777") {
  34. let second_frame = `
  35. <div id="second_frame" style="position: absolute; z-index: 999;">
  36. <div id="second_frameheader" style="cursor: move; opacity: 0.0; margin-bottom: -50px">-<br>-</div>
  37. <iframe src="/367958257" width="800" height="600" style="resize: both; overflow: auto;">
  38. </iframe>
  39. </div>
  40. `;
  41. let title = document.getElementsByClassName("live-mod-anchor normal-anchor-info live-anchor-normal")[0];
  42. title.innerHTML= second_frame + title.innerHTML;
  43.  
  44. dragElement(document.getElementById("second_frame"));
  45. }
  46.  
  47. setTimeout(set_second_frame, 1000);
  48. }
  49.  
  50. function dragElement(elmnt) {
  51. var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
  52. if (document.getElementById(elmnt.id + "header")) {
  53. // if present, the header is where you move the DIV from:
  54. document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
  55. } else {
  56. // otherwise, move the DIV from anywhere inside the DIV:
  57. elmnt.onmousedown = dragMouseDown;
  58. }
  59.  
  60. function dragMouseDown(e) {
  61. e = e || window.event;
  62. e.preventDefault();
  63. // get the mouse cursor position at startup:
  64. pos3 = e.clientX;
  65. pos4 = e.clientY;
  66. document.onmouseup = closeDragElement;
  67. // call a function whenever the cursor moves:
  68. document.onmousemove = elementDrag;
  69. }
  70.  
  71. function elementDrag(e) {
  72. e = e || window.event;
  73. e.preventDefault();
  74. // calculate the new cursor position:
  75. pos1 = pos3 - e.clientX;
  76. pos2 = pos4 - e.clientY;
  77. pos3 = e.clientX;
  78. pos4 = e.clientY;
  79. // set the element's new position:
  80. elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
  81. elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
  82. }
  83.  
  84. function closeDragElement() {
  85. // stop moving when mouse button is released:
  86. document.onmouseup = null;
  87. document.onmousemove = null;
  88. }
  89. }
  90. setTimeout(load_second_frame, 1000);

QingJ © 2025

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