NodeSeek/DeepFlood 界面优化

优化:1. 修复导航栏位置 2. 模糊用户隐私信息 3. 优化选项可自由控制(开启/关闭)

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         NodeSeek/DeepFlood 界面优化
// @namespace    https://github.com/0x1KKI
// @version      1.3
// @description  优化:1. 修复导航栏位置 2. 模糊用户隐私信息 3. 优化选项可自由控制(开启/关闭)
// @author       0xIKKI
// @match        *://www.nodeseek.com/*
// @match        *://www.deepflood.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=www.deepflood.com
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_registerMenuCommand
// @license      MIT
// ==/UserScript==

(function() {
    'useS strict';

    const KEY_NAV_FIX = 'navFixEnabled';
    const KEY_BLUR_USER = 'userStatBlurEnabled';

    let navFixEnabled = GM_getValue(KEY_NAV_FIX, true);
    let blurUserEnabled = GM_getValue(KEY_BLUR_USER, true);

    GM_registerMenuCommand(
        (navFixEnabled ? '✅ 已开启' : '❌ 已关闭') + ' - 修复导航栏位置',
        () => {
            GM_setValue(KEY_NAV_FIX, !navFixEnabled);
            location.reload();
        }
    );

    GM_registerMenuCommand(
        (blurUserEnabled ? '✅ 已开启' : '❌ 已关闭') + ' - 模糊用户隐私信息',
        () => {
            GM_setValue(KEY_BLUR_USER, !blurUserEnabled);
            location.reload();
        }
    );

    const addGlobalStyle = (css) => {
        const head = document.head;
        if (!head) { return; }
        const style = document.createElement('style');
        style.textContent = css;
        head.appendChild(style);
    };

    if (navFixEnabled) {
        const div1 = document.getElementById('nsk-body');
        const div2 = document.getElementById('nsk-left-panel-container');
        if (div1 && div2) {
            div1.parentNode.insertBefore(div2, div1);
        }
    }

    if (blurUserEnabled) {

        const blurStyles = `
            /* 已更新为 .stat-block */
            .stat-block {
                filter: blur(5px);
                transition: filter 0.3s ease;
            }

            /* 已更新为 .stat-block */
            .stat-block:hover {
                filter: blur(0);
            }
        `;
        addGlobalStyle(blurStyles);
    }

})();