Greasy Fork is available in English.

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

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

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

Avaliação: Bom - o script funciona

§
Publicado em: 01/01/2025

可以同时适配 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
            }
        });
    }

Enviar resposta

Entre para publicar uma resposta.