Greasy Fork

Greasy Fork is available in English.

中转页面自动跳转

某些网站打开链接会进入安全中转页面,此脚本实现自动跳转功能

目前为 2021-09-30 提交的版本,查看 最新版本

// ==UserScript==
// @name         中转页面自动跳转
// @namespace    dhjesus
// @version      0.0.2
// @keywords     微信,稀土掘金
// @description  某些网站打开链接会进入安全中转页面,此脚本实现自动跳转功能
// @author       DHJesus
// @include     *://weixin110.qq.com/*
// @include     *://link.juejin.cn/*
// @grant        none
// @compatible	 Chrome
// @compatible	 Firefox
// @compatible	 Edge
// @compatible	 Safari
// @compatible	 Opera
// @compatible	 UC
// ==/UserScript==

(function () {
  var host = window.location.host;

  if(host.indexOf('weixin110') != -1) {
    window.location.href = document.getElementsByClassName('weui-msg__desc')[0].textContent;
  }
  
  if(host.indexOf('juejin') != -1) {
    window.location.href = document.getElementsByTagName('p')[1].textContent;
  }
})();