路由器显示隐藏设置

2025/8/1 13:33:00

// ==UserScript==
// @name        路由器显示隐藏设置
// @namespace   Violentmonkey Scripts
// @match       http://192.168.*.*/*
// @grant       none
// @version     1.0
// @author      lqs1848
// @run-at       document-end.
// @description 2025/8/1 13:33:00
// @supportURL  https://blog.lqs1848.top/
// @license MIT
// ==/UserScript==
'use strict';

function removeDisplayNone(){
  const allElements = document.querySelectorAll('tr');
  allElements.forEach(element => {
      const computedStyle = window.getComputedStyle(element);
      if (computedStyle.display === 'none') {
          element.style.display = '';
      }
  });
}

const targetNode = document;
const config = { attributes: true, childList: true, subtree: true};
const callback = function(mutationsList, observer) {
    removeDisplayNone();
};
const observer = new MutationObserver(callback);
observer.observe(targetNode, config);