Greasy Fork is available in English.

隐藏知乎网页中的知乎直答外链

隐藏知乎网页中的知乎直答外链,并且去掉✦角标

< 脚本隐藏知乎网页中的知乎直答外链的反馈

评价:好评 - 脚本运行良好

§
发表于:2025-01-01

可以同时适配 zhuanlan.zhihu.com

// @match        *://*.zhihu.com/*

个人喜欢把超链接整个干掉:

    // Function to process both links and SVGs
    function processNode(node) {
        const links = node.querySelectorAll('a.RichContent-EntityWord');
        links.forEach(link => {
            if (link.dataset.modified) return; // Skip already processed links
            let keyword = link.textContent;
            if (keyword) {
                const textNode = document.createTextNode(keyword); // Create a text node with the link's text
                link.replaceWith(textNode); // Replace the <a> element with the text node
            }
        });
    }

发表回复

登录以发表回复。