Skip to content

Commit

Permalink
Deploying to gh-pages from @ bb8cad3 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
maomao1996 committed May 18, 2024
1 parent 85c16f9 commit a00bc70
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions remove-redirect.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// @name 跳转链接修复(移除重定向外链直达)
// @description 修复跳转链接为站外直链(移除重定向),免去拦截页面点击步骤可直达站外;拦截页面自动跳转;已适配爱发电、百度搜索、CSDN、豆瓣、Facebook、码云、Google 搜索、Google 重定向页、花瓣网、InfoQ、Instagram、简书、掘金、金山文档、链滴、力扣(Leetcode)、51CTO 博客、NGA 玩家社区、牛客网、开源中国、pixiv、微信、微信开放社区、QQ 邮箱、PC 版 QQ、腾讯文档、腾讯兔小巢、360 搜索、少数派、腾讯云开发者社区、推特(Twitter)、微博、YouTube、语雀、知乎、知乎专栏
// @namespace maomao1996.remove-redirect
// @version 2.10.1
// @version 2.10.2
// @author maomao1996
// @homepage https://github.com/maomao1996/tampermonkey-scripts
// @supportURL https://github.com/maomao1996/tampermonkey-scripts/issues
Expand Down Expand Up @@ -138,7 +138,7 @@
n(e) && t.setAttribute("href", e);
}
}
} ] ], d = [ [ "\u63a8\u7279\uff08Twitter\uff09", "twitter.com", {
} ] ], d = [ [ "\u63a8\u7279\uff08Twitter\uff09", /^(twitter|x)\.com$/, {
transform: {
selector: 'a[href*="://t.co/"]',
customTransform: function(t) {
Expand Down Expand Up @@ -435,29 +435,29 @@
if (t(b)) {
var j = b[2], w = j.transform, q = j.rewriteWindowOpen, k = j.autojump;
if (w) {
var C = w.selector, N = w.queryName, A = w.separator, S = void 0 === A ? "?target=" : A, T = w.customTransform, O = void 0 === T ? function(t) {
var C = w.selector, N = w.queryName, A = w.separator, S = void 0 === A ? "?target=" : A, T = w.customTransform, x = void 0 === T ? function(t) {
var e = "";
N && (e = h(new URL(t.href).search, N));
n(e) || (e = t.href.split(S)[1]), n(e = decodeURIComponent(e)) && (t.href = e);
} : T;
new MutationObserver((function() {
document.querySelectorAll(C).forEach(O);
document.querySelectorAll(C).forEach(x);
})).observe(document.body, {
childList: !0,
subtree: !0
});
}
if (q) {
var U = q.validationRule, x = q.getOriginalUrl, R = q.separator, L = q.queryName, $ = void 0 === L ? "target" : L, _ = window.open;
var O = q.validationRule, U = q.getOriginalUrl, R = q.separator, $ = q.queryName, L = void 0 === $ ? "target" : $, _ = window.open;
window.open = function(t, o, a) {
if (r(t)) {
if (r(U) && !t.includes(U) || e(U) && !U(t)) return _.call(this, t, o, a);
if (e(x)) {
var u = x(t);
if (r(O) && !t.includes(O) || e(O) && !O(t)) return _.call(this, t, o, a);
if (e(U)) {
var u = U(t);
u && n(u) && (t = u);
} else {
var i, c = new URL(t).search;
t = decodeURIComponent(R ? null === (i = c.split(R)) || void 0 === i ? void 0 : i[1] : h(c, $));
t = decodeURIComponent(R ? null === (i = c.split(R)) || void 0 === i ? void 0 : i[1] : h(c, L));
}
}
return _.call(this, t, o, a);
Expand Down

0 comments on commit a00bc70

Please sign in to comment.