fxzhihu-script

fix up zhihu in your browser.

目前為 2025-01-22 提交的版本,檢視 最新版本

// ==UserScript==
// @name        fxzhihu-script
// @version     0.1.0
// @description fix up zhihu in your browser.
// @license     MIT
// @namespace   https://thynanami.dev
// @match       https://www.zhihu.com/question/*
// @match       https://www.zhihu.com/question/*/answer/*
// @match       https://zhuanlan.zhihu.com/p/*
// @match       https://www.google.com/search*
// ==/UserScript==

(function(){"use strict";const e=window.location.href;e.includes("google")?document.querySelectorAll('span > a[rel="noopener"]').forEach(i=>{const c=i.getAttribute("href")||"";if(c.includes("www.zhihu.com/question")||c.includes("zhuanlan.zhihu.com/p")){i.setAttribute("href",c.replace("zhihu.com","fxzhihu.com"));const o=i.querySelector("div > div > div > div > cite");o&&(o.textContent=o.textContent?.replace("zhihu.com","fxzhihu.com")||"")}}):(e.includes("www.zhihu.com/question")||e.includes("zhuanlan.zhihu.com/p"))&&window.location.replace(e.replace("zhihu.com","fxzhihu.com"))})();

QingJ © 2025

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