B站直播马赛克去除

在live.bilibili.com中移除id为 'web-player-module-area-mask-panel' 的元素

  1. // ==UserScript==
  2. // @name B站直播马赛克去除
  3. // @namespace http://github.com/x7z0
  4. // @version 0.1
  5. // @description 在live.bilibili.com中移除id为 'web-player-module-area-mask-panel' 的元素
  6. // @author x7z0
  7. // @match *://live.bilibili.com/*
  8. // @license MIT
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Function to remove the element
  16. function removeElement() {
  17. var element = document.getElementById('web-player-module-area-mask-panel');
  18. if (element) {
  19. element.remove();
  20. }
  21. }
  22.  
  23. // Run the function once the page has fully loaded
  24. window.addEventListener('load', removeElement);
  25.  
  26. // Optionally, use a MutationObserver to handle dynamic content changes
  27. var observer = new MutationObserver(removeElement);
  28. observer.observe(document.body, { childList: true, subtree: true });
  29. })();