Greasy Fork is available in English.
某些网站打开链接会进入安全中转页面,此脚本实现自动跳转功能
当前为
// ==UserScript==
// @name 中转页面自动跳转
// @namespace dhjesus
// @version 0.0.5
// @keywords 微信,稀土掘金,CSDN
// @description 某些网站打开链接会进入安全中转页面,此脚本实现自动跳转功能
// @author DHJesus
// @include *://weixin110.qq.com/*
// @include *://link.juejin.cn/*
// @include *://link.csdn.net/*
// @grant none
// @compatible Chrome
// @compatible Firefox
// @compatible Edge
// @compatible Safari
// @compatible Opera
// @compatible UC
// ==/UserScript==
(function () {
var host = window.location.host;
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
return(false);
}
if(host.indexOf('weixin110') != -1) {
window.location.href = document.getElementsByClassName('weui-msg__desc')[0].textContent;
}
if(host.indexOf('juejin') != -1) {
var target = decodeURIComponent(getQueryVariable('target'));
window.location.href = target;
// window.location.href = document.getElementsByTagName('p')[1].textContent;
}
if(host.indexOf('csdn') != -1) {
var target = decodeURIComponent(getQueryVariable('target'));
window.location.href = target;
}
})();