// ==UserScript==
// @name         自动处理跳转外链
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  自动处理很多网站跳转外链需要手动确认的问题
// @author       westinyang
// @match        http://t.cn/*
// @match        https://weibo.cn/sinaurl?*
// @match        https://www.jianshu.com/go-wild?*
// @match        http*://link.zhihu.com/?*
// @match        https://www.douban.com/link2/?url=*
// @match        https://link.ld246.com/forward?goto=*
// @match        https://mp.weixin.qq.com/*
// @match        http://redir.yy.duowan.com/warning.php?url=*
// @match        https://weixin110.qq.com/cgi-bin/mmspamsupport-bin/newredirectconfirmcgi*
// @match        https://link.csdn.net/?target=*
// @match        https://steamcommunity.com/linkfilter/?url=*
// @match        https://game.bilibili.com/linkfilter/?url=*
// @match        https://www.oschina.net/action/GoToLink?url=*
// @match        https://developers.weixin.qq.com/community/middlepage/href?href=*
// @match        https://docs.qq.com/scenario/link.html?url=*
// @match        https://www.pixiv.net/jump.php?url=*
// @match        https://www.chinaz.com/go.shtml?url=*
// @match        http://www.360doc.com/content/*
// @match        https://nga.178.com/read.php?*
// @match        https://bbs.nga.cn/read.php?*
// @match        http*://c.pc.qq.com/*
// @match        https://www.yuque.com/r/goto?url=*
// @match        https://www.mcbbs.net/plugin.php?id=link_redirect&target=*
// @match        https://link.juejin.cn/?target=*
// @match        http*://www.360doc.cn/outlink.html?url=*
// @match        https://jump2.bdimg.com/safecheck/index?url=*
// @match        http*://iphone.myzaker.com/zaker/link.php?*
// @match        https://www.tianyancha.com/security?target=*
// @match        https://afdian.net/link?target=*
// @match        https://mail.qq.com/cgi-bin/readtemplate*
// @match        https://link.logonews.cn/?*
// @match        https://link.uisdc.com/?redirect=*
// @match        https://gitee.com/link?target=*
// @match        https://leetcode-cn.com/link/?target=*
// @match        https://*.infoq.cn/link?target=*
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAHYAAAB2AH6XKZyAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2Nh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// ==/UserScript==

(function() {
    'use strict';

    // # 脚本图标
    // https://www.flaticon.com/free-icon/link_6994770
    // https://www.flaticon.com/premium-icon/link_4154427

    // # 网址参考
    // https://greasyfork.org/zh-CN/scripts/412612-open-the-f-king-url-right-now
    // https://github.com/OldPanda/Open-the-F-king-URL-Right-Now

    window.location.search.substr(1).split("&").every((item) => {
        let val = item.split("=")[1];
        if (val.startsWith("http")) {
          location.href = decodeURIComponent(val);
          return false;
        }
        return true;
    });
})();