知乎网页版给文章一些关键词添加了知乎直答链接,复制保存文章时也会将这些不必要的链接复制下来,故写了一个简单的 TamperMonkey 脚本将直答链接转为普通文字,使得笔记更清爽,请有需要的小伙伴按需使用:

// ==UserScript==
// @name         删除知乎文章中的直答链接
// @namespace    http://tampermonkey.net/
// @version      2025-08-02
// @description  删除知乎文章中的直答链接
// @AuThor       You
// @match        https://zhuanlan.zhihu.com/p/*
// @Icon         https://www.google.com/s2/favicons?sz=64&domain=zhihu.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    let alla = document.querySelectorAll("a.RichContent-EntityWord");
    alla.forEach(function(e,idx,array){
        let par = e.parentElement;
        let text = e.text;
        e.remove();
        par.textContent = text;
    });
})();


评论(0条)

请登录后评论
ziyuan

ziyuan Rank: 16

0

0

0

( 此人很懒并没有留下什么~~ )

首页

栏目

搜索

会员