虎牙去除全屏礼物

none

  1. // ==UserScript==
  2. // @name 虎牙去除全屏礼物
  3. // @namespace none
  4. // @version 1.0
  5. // @description none
  6. // @author none
  7. // @include *://*.huya.com/*
  8. // @include *://*.douyu.com/*
  9. // @include *://live.bilibili.com/*
  10. // @include *://live.douyin.com/*
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14.  
  15. (function () {
  16. var domain = location.hostname;
  17. // huya.com
  18. if (['www.huya.com'].includes(domain)) {
  19. function videoType() {
  20. console.log("切换清晰度 -> ready");
  21. var time_num = 0;
  22. var t1 = setInterval(function () {
  23. time_num+=5
  24. $(".player-videotype-list li:nth-child(2)").click();
  25. if (time_num==240) {
  26. clearInterval(t1);
  27. console.log("结束");
  28. }
  29. }, 35);
  30. }
  31.  
  32. let open_box = setInterval(function () {
  33. console.log("自动领取礼包 -> ready");
  34. let box = $(".player-box-stat3");
  35. if ($(box[5]).parent().children("p")[3].innerHTML == "") {
  36. box.each(function () {
  37. if (this.style.visibility == "visible") {
  38. this.click();
  39. $("#player-box")[0].style.display = "none";
  40. }
  41. });
  42. } else {
  43. console.log("自动领取礼包 -> over");
  44. clearInterval(open_box);
  45. }
  46. }, 30000);
  47.  
  48. function loadStyle(css) {
  49. var style = document.createElement('style');
  50. style.type = 'text/css';
  51. style.rel = 'stylesheet';
  52. style.appendChild(document.createTextNode(css));
  53. var head = document.getElementsByTagName('head')[0];
  54. head.appendChild(style);
  55. }
  56. let css = '#player-gift-wrap{display:none !important;height:0 !important}';//底部礼物
  57. css += '.player-wrap{height:100% !important}';//视频播放高度修正
  58. css += '#player-ctrl-wrap{bottom:0px !important }';//视频播放高度修正
  59. css += '#chatRoom{height:80% !important;}';//修正评论高度
  60. css += '#chatRoom > div{height:100% !important;}';//修正评论高度
  61. css += '.room-footer{display:none !important;}';//修正评论高度
  62.  
  63. //鼠标移入移出显示播放器控制条
  64. function displayMode() {
  65. $("#J_playerMain").mouseover(function () {
  66. $(".mode-page-full #player-ctrl-wrap").show();
  67. $(".mode-page-full #player-wrap").css("height", "100%");
  68. }).mouseout(function () {
  69. $(".mode-page-full #player-ctrl-wrap").hide();
  70. $(".mode-page-full #player-wrap").css("height", "100%");
  71. });
  72. }
  73. loadStyle(css);
  74. displayMode();
  75. videoType();
  76. }
  77.  
  78. // douyu.com
  79. if (['www.douyu.com'].includes(domain)) {
  80. console.log("检测到");
  81. let choose_time = setInterval(() => {
  82. if (document.getElementsByClassName("wfs-2a8e83").length > 0) {
  83. clearInterval(choose_time);
  84. //document.querySelector('div.wfs-2a8e83').click();
  85. document.querySelectorAll(".tipItem-898596 > ul > li")[0].click();
  86. console.log("切换成功");
  87. }
  88. }, 1000);
  89. }
  90. // bilibili.com
  91. if (['live.bilibili.com'].includes(domain)) {
  92.  
  93. function loadStyle(css) {
  94. var style = document.createElement('style');
  95. style.type = 'text/css';
  96. style.rel = 'stylesheet';
  97. style.appendChild(document.createTextNode(css));
  98. var head = document.getElementsByTagName('head')[0];
  99. head.appendChild(style);
  100. }
  101. let css = '#gift-control-vm{display:none !important;height:0 !important}';//底部礼物
  102. css += '#web-player__bottom-bar__container{display:none !important;height:0 !important}';//底部礼物,最大化
  103.  
  104. loadStyle(css);
  105. }
  106. // douyin.com
  107. if (['live.douyin.com'].includes(domain)) {
  108.  
  109. function loadStyle(css) {
  110. var style = document.createElement('style');
  111. style.type = 'text/css';
  112. style.rel = 'stylesheet';
  113. style.appendChild(document.createTextNode(css));
  114. var head = document.getElementsByTagName('head')[0];
  115. head.appendChild(style);
  116. }
  117. let css = '.aqK_4_5U{display:none !important;height:0 !important}';//底部礼物
  118. css += '#aqK_4_5U{display:none !important;height:0 !important}';//底部礼物,最大化
  119. loadStyle(css);
  120. }
  121. })();

QingJ © 2025

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