Greasy Fork is available in English.

简书去除重定向

简书外链免跳转,去除重定向,直接访问源地址

// ==UserScript==
// @name         简书去除重定向
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  简书外链免跳转,去除重定向,直接访问源地址
// @author       [email protected]
// @match        *://*.jianshu.com/*
// @grant        none
// ==/UserScript==

(function() {
    var pre = "https://links.jianshu.com/go?to=";
    var as = document.getElementsByTagName("a");
    for(var i = 0; i < as.length; i++){
        var a = as[i];
        var link = a.href;
        if(link.startsWith(pre)){
            link = link.replace(pre,"");
            link = decodeURIComponent(link);
            a.href = link;
        }
    }
})();