x.i.u知乎搜索框净化改进版本

搜索框净化!

// ==UserScript==
// @name         x.i.u知乎搜索框净化改进版本
// @namespace    http://tampermonkey.net/
// @version      24.12.11.21.14
// @description  搜索框净化!
// @author       onionycs
// @match        https://*.zhihu.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=zhihu.com
// @grant        none
// @license      mit
// ==/UserScript==

(function() {
    // 推荐安装 xiu的脚本 https://gf.qytechs.cn/scripts/419081
    // 先来个3秒中的
    function f() {
        const elements = document.querySelectorAll('input[placeholder]');
        elements.forEach(element => {
            if (element) {
                element.placeholder = "";
            }
        });
    }

    let executionCount = 0;
    const interval = setInterval(() => {
        f();
        executionCount++;
        if (executionCount >= 30) {
            clearInterval(interval);
        }
    }, 100);

    setInterval(() => {
        document.querySelectorAll('input[placeholder]').forEach(input => {
            if (input.placeholder !== '') {
                input.placeholder = '';
            }
        });
    }, 1000); // 1 second interval

})();

QingJ © 2025

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