您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
遇到跳转提示时自动打开对应网页,减少点击步骤。
// ==UserScript== // @name 知乎、CSDN自动跳转 // @namespace 妖伊社 // @version 0.1 // @description 遇到跳转提示时自动打开对应网页,减少点击步骤。 // @author 妖伊社 // @match http://link.zhihu.com/* // @match https://link.zhihu.com/* // @match https://link.csdn.net/* // @icon https://www.google.com/s2/favicons?domain=tampermonkey.net // @grant unsafeWindow // @license MIT // ==/UserScript== (function() { 'use strict'; const url = window.location.href; var urlGoto = ""; function TranslateUrl(urlOrigin){ var s = urlOrigin.replace("%3A", ":"); while(s.includes("%2F")){ s = s.replace("%2F", "/"); } return s; } function ZhiHu(){ if(!url.includes("link.zhihu.com")){ return; } urlGoto = TranslateUrl(url.substring(url.indexOf("target=")+7, url.length)); window.location.href = urlGoto; } function CSDN(){ if(!url.includes("link.csdn.net")){ return; } urlGoto = TranslateUrl(url.substring(url.indexOf("target=")+7, url.length)); window.location.href = urlGoto; } ZhiHu(); CSDN(); })();