RemoveLive

模仿chr_写的B站直播间移除插件

  1. // ==UserScript==
  2. // @name RemoveLive
  3. // @namespace http://meng.cpm/
  4. // @version 0.1
  5. // @description 模仿chr_写的B站直播间移除插件
  6. // @author meng
  7. // @match https://live.bilibili.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
  9. // @grant none
  10. // @license AGPL-3.0
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. debugger;
  15. 'use strict';
  16. // 给浏览器放入一个键值对,永久保存在浏览器中
  17. let VEnable = window.localStorage.getItem("VEnable") === "true";
  18. if(VEnable){
  19. setTimeout(() => {
  20. document.getElementById("live-player").remove();
  21. }, 3000);
  22. }
  23. let btnArea = document.querySelector(".right-ctnr");
  24. let btn = document.createElement("botton");
  25. btn.id = "removelive";
  26. btn.textContent = VEnable ? "恢复播放器" : "移除播放器";
  27. btn.addEventListener("click",function(){
  28. VEnable = !VEnable;
  29. window.localStorage.setItem("VEnable",VEnable);
  30. btn.textContent = VEnable ? "恢复播放器" : "移除播放器";
  31. if(VEnable){
  32. document.getElementById("live-player").remove();
  33. }else{
  34. window.location.reload();
  35. }
  36. });
  37. btnArea.insertBefore(btn,btnArea.children[0]);
  38. })();

QingJ © 2025

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