咪咕比赛回放隐藏比分

隐藏咪咕视频回放

  1. // ==UserScript==
  2. // @name 咪咕比赛回放隐藏比分
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.4
  5. // @license MIT
  6. // @description 隐藏咪咕视频回放
  7. // @author wanwen
  8. // @match https://www.miguvideo.com/*
  9. // @grant none
  10. // ==/UserScript==
  11. (function() {
  12. 'use strict';
  13. function hideNumbers() {
  14. var elements = document.querySelectorAll('.video-title, h1, h2');
  15. var arabicNumeralPattern = /[0-9]/;
  16. elements.forEach(function(element) {
  17. if (arabicNumeralPattern.test(element.textContent)) {
  18. element.style.display = 'none';
  19. }
  20. });
  21. }
  22. function hideEpisodeElement() {
  23. var episodeElement = document.querySelector('.episode.fr');
  24. if (episodeElement) {
  25. episodeElement.style.display = 'none';
  26. }
  27. }
  28. function zoomPage() {
  29. document.body.style.zoom = "100%";
  30. }
  31. var observer = new MutationObserver(function(mutations) {
  32. mutations.forEach(function(mutation) {
  33. if (mutation.addedNodes && mutation.addedNodes.length > 0) {
  34. // Call hideNumbers and hideEpisodeElement on each mutation to ensure elements are hidden
  35. hideNumbers();
  36. hideEpisodeElement();
  37. }
  38. });
  39. });
  40. var config = { childList: true, subtree: true };
  41. // Start observing the body for changes in the DOM
  42. observer.observe(document.body, config);
  43. // Initial call to hide numbers, hide episode element, and set zoom
  44. hideNumbers();
  45. hideEpisodeElement();
  46. zoomPage();
  47. })();

QingJ © 2025

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