您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
知乎/csdn 转跳
// ==UserScript== // @name 知乎/csdn外链转跳 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 知乎/csdn 转跳 // @author 白水 // @match https://link.zhihu.com/?target=* // @match https://link.csdn.net/?target=* // @run-at document-start // @icon https://www.zhihu.com/favicon.ico // @grant none // ==/UserScript== (function() { 'use strict'; //多行缓慢解法 /* var getUrl = window.location.href; //var res = str.split("https://translate.google.com/?tl=en#auto/en/"); //if (window.location.host = "link.zhihu.com"){ //window.location.href = str.replace("https://link.zhihu.com/?target=http%3A","http:"); //} //@note: 开坑; csdn跳转 //https://opensource.com/article/19/3/favorite-terminal-emulators //https://link.csdn.net/?target=https%3A%2F%2Fopensource.com%2Farticle%2F19%2F3%2Ffavorite-terminal-emulators var res = getUrl.split("?target="); var str = res[1]; str = str.replaceAll("%3A",":"); str = str.replaceAll("%2F","/"); */ window.location.href = (window.location.href.split("?target=")[1].replace("%3A",":")).replaceAll("%2F","/"); //采用字典法 /* var replacements = { "my" : "his", "is" : "was", "can": "could" }; replacements.my replacements = [ {"my" : "his"}, {"is" : "was"}, {"can": "could"} ]; replacements[0]//{my: "his"}; var regex = new RegExp(properties(replacements).map(RegExp.escape).join("|"), "g"); str = str.replace(regex, function($0) { return replacements[$0]; }); window.location.href = str */ })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址