Skip to content

Commit

Permalink
only do redirection when there's redirect url on luogu page (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
OldPanda authored Aug 28, 2024
1 parent 2559113 commit 11934a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ const fuckers = {
leetcode: { match: 'https://leetcode.cn/link/?target', redirect: "target" },
linkedin: { match: 'https://www.linkedin.com/safety/go?url=', redirect: "url" },
logonews: { match: 'https://link.logonews.cn/?', redirect: "url" },
luogu: { match: 'https://www.luogu.com.cn/paste/', redirect: function () { window.location.href = $("#url").text() } },
luogu_2: { match: 'https://www.luogu.com.cn/discuss/', redirect: function () { window.location.href = $("#url").text() } },
luogu: { match: 'https://www.luogu.com.cn/paste/', redirect: function () { if (document.getElementById("url")) { window.location.href = $("#url").text() } } },
luogu_2: { match: 'https://www.luogu.com.cn/discuss/', redirect: function () { if (document.getElementById("url")) { window.location.href = $("#url").text() } } },
mcbbs: { match: 'https://www.mcbbs.net/plugin.php?id=link_redirect&target=', redirect: "target" },
nga: { match: 'https://nga.178.com/read.php?', redirect: function () { $("#m_posts #m_posts_c a").prop("onclick", null).off("click") } },
nga2: { match: 'https://bbs.nga.cn/read.php?', redirect: function () { $("#m_posts #m_posts_c a").prop("onclick", null).off("click") } },
Expand Down

0 comments on commit 11934a0

Please sign in to comment.