Show DNS Settings (TIM H388X)

11/10/2025, 12:00:00 AM

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Show DNS Settings (TIM H388X)
// @namespace   https://github.com/lewiwiii
// @match       http://192.168.1.1/*
// @version     1.0
// @author      wiwi
// @grant       none
// @license     MIT
// @description 11/10/2025, 12:00:00 AM
// ==/UserScript==


(function() {
    'use strict';
    const TARGET_IDS = ['div_DNSServer1', 'div_DNSServer2'];
    function ensureVisibility() {
        for (const id of TARGET_IDS) {
            const element = document.getElementById(id);
            if (element && element.style.display === 'none') {
                element.style.display = '';
            }
        }
        const dnsServer1 = document.getElementById(TARGET_IDS[0]);
        if (dnsServer1) {
            const parentContainer = dnsServer1.parentElement;
            if (parentContainer && parentContainer.children.length > 0) {
                const anonymousDiv = parentContainer.children[0];
                if (anonymousDiv.classList.contains('row') && anonymousDiv.style.display === 'none') {
                    anonymousDiv.style.display = '';
                }
            }
        }
    }
    const visibilityChecker = setInterval(ensureVisibility, 20);
    setTimeout(() => {
        clearInterval(visibilityChecker);
    }, 300000);
})();