🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

🔥🔥🔥跳转链接直达🔥🔥🔥

跳转链接直达,去掉确定跳转链接页面,用于谷歌、知乎、CSDN、简书

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

You will need to install an extension such as Tampermonkey to install this script.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name        🔥🔥🔥跳转链接直达🔥🔥🔥
// @description 跳转链接直达,去掉确定跳转链接页面,用于谷歌、知乎、CSDN、简书
// @namespace   https://github.com/WindrunnerMax/TKScript
// @version     1.3.3
// @author      Czy
// @match       *://*.google.com/*
// @match       *://*.google.com.cn/*
// @match       *://*.google.com.hk/*
// @match       *://link.zhihu.com/*
// @match       *://link.csdn.net/*
// @match       *://link.juejin.cn/*
// @match       *://www.jianshu.com/go-wild/*
// @match       *://mail.qq.com/cgi-bin/readtemplate/*
// @license     MIT License
// @supportURL  https://github.com/WindrunnerMax/TKScript/issues
// @run-at      document-start
// @grant       unsafeWindow
// @grant       GM_xmlhttpRequest
// ==/UserScript==
(function () {
  'use strict';

  const website$5 = {
    regexp: /google/,
    init: function() {
      const isScholar = window.location.host.startsWith("scholar");
      const selector = isScholar ? "#gs_bdy_ccl .gs_rt a" : "#res a";
      document.addEventListener(
        "DOMContentLoaded",
        () => document.querySelectorAll(selector).forEach((item) => item.setAttribute("target", "_blank"))
      );
    }
  };

  const website$4 = {
    regexp: /link\.zhihu/,
    init: function() {
      const result = /.*link.zhihu.com\/\?target=(.*)/.exec(location.href);
      if (result) {
        const url = decodeURIComponent(result[1]);
        if (url) {
          console.log(url);
          location.href = url;
        }
      }
    }
  };

  const website$3 = {
    regexp: /csdn/,
    init: function() {
      const result = /.*link.csdn.net\/\?target=(.*)/.exec(location.href);
      if (result) {
        const url = decodeURIComponent(result[1]);
        if (url) {
          console.log(url);
          location.href = url;
        }
      }
    }
  };

  const website$2 = {
    regexp: /jianshu/,
    init: function() {
      const result = /.*jianshu.com\/go-wild.*url=(.*)/.exec(location.href);
      if (result) {
        const url = decodeURIComponent(result[1]);
        if (url) {
          location.href = url;
        }
      }
    }
  };

  const website$1 = {
    regexp: /mail\.qq/,
    init: function() {
      const result = new URL(location.href).searchParams.get("gourl");
      if (result) {
        location.href = decodeURIComponent(result);
      }
    }
  };

  const website = {
    regexp: /link\.juejin/,
    init: function() {
      const result = new URL(location.href).searchParams.get("target");
      if (result) {
        location.href = decodeURIComponent(result);
      }
    }
  };

  const websites = [website$5, website$4, website$3, website$2, website$1, website];

  (() => {
    const mather = (regex, website) => {
      if (regex.test(window.location.href)) {
        website.init();
        return true;
      }
      return false;
    };
    websites.some((website) => mather(website.regexp, website));
  })();

}());