Greasy Fork is available in English.

知乎,简书等外部链接自动跳转

知乎等网站跳转外部链接时,可自动点击确定,跳转

// ==UserScript==
// @name        知乎,简书等外部链接自动跳转
// @namespace    https://github.com/idcpj
// @version      0.2
// @description  知乎等网站跳转外部链接时,可自动点击确定,跳转
// @author       idcpj

// @match        *www.jianshu.com/go-wild?ac=2&url*
// @match        *link.zhihu.com/?target=*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';


    /*=======  edit  your  site =========*/
    //[网站,点击按钮的class]
    var urlList=[
        ["www.jianshu.com","._3OuyzjzFBDdQwRGk08HXHz_0"],
        ["link.zhihu.com",".button"],
    ];


    /*=======  edit  your  site =========*/
    var href = window.location.href;
    window.onload=function(){
        for (var i = 0; i < urlList.length; i++) {
            if(href.indexOf(urlList[i][0])!=-1){
                document.querySelector(urlList[i][1]).click();
            }
        }
    }

})();