隐藏B站视频播放中的推荐视频

寸金难买寸光阴

  1. // ==UserScript==
  2. // @name 隐藏B站视频播放中的推荐视频
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.5
  5. // @description 寸金难买寸光阴
  6. // @author You
  7. // @match *://www.bilibili.com/video*
  8. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. //window.addEventListener('load', ()=>{
  17. const newStyle = document.createElement("style")
  18. newStyle.innerHTML = `
  19. .r-con {
  20. visibility: hidden;
  21. }
  22.  
  23. .bpx-player-ending-panel{
  24. display: none !important;
  25. }
  26.  
  27. `
  28. document.head.appendChild(newStyle)
  29. localStorage.setItem("recommend_auto_play", "close")
  30. //})
  31.  
  32.  
  33. var intv = setInterval(()=>{
  34. var rcon = document.getElementsByClassName("right-container")[0]
  35. var rconLis = rcon.childNodes
  36. if(rcon != void 0){
  37. clearInterval(intv)
  38. setTimeout(()=>{
  39. rcon.style.visibility = "visible"
  40. while(rconLis.length != 2){
  41. rconLis[rconLis.length-1].remove()
  42. }
  43. }, 5000)
  44. }
  45. }, 300)
  46. // Your code here...
  47. })();

QingJ © 2025

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