Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/scripts-header/redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
export default isProd =>
`// ==UserScript==
// @name redirect 外链跳转
// @version 1.65.0
// @description 自动跳转(重定向)到目标链接,免去点击步骤。适配了简书、知乎、微博、QQ邮箱、QQPC、QQNT、印象笔记、贴吧、CSDN、YouTube、微信、企业微信、微信开放社区、开发者知识库、豆瓣、个人图书馆、Pixiv、搜狗、Google、站长之家、OSCHINA、掘金、腾讯文档、pc6下载站、爱发电、Gitee、天眼查、爱企查、企查查、优设网、51CTO、力扣、花瓣网、飞书、Epic、Steam、语雀、牛客网、哔哩哔哩、少数派、5ch、金山文档、石墨文档、urlshare、酷安、网盘分享、腾讯云开发者社区、腾讯兔小巢、云栖社区、NodeSeek、亿企查、异次元软件、HelloGitHub、知更鸟、巴哈姆特、ABABTOOLS、阿里云帮助中心
// @version 1.66.0
// @description 自动跳转(重定向)到目标链接,免去点击步骤。适配了简书、知乎、微博、QQ邮箱、QQPC、QQNT、印象笔记、贴吧、CSDN、YouTube、微信、企业微信、微信开放社区、开发者知识库、豆瓣、个人图书馆、Pixiv、搜狗、Google、站长之家、OSCHINA、掘金、腾讯文档、pc6下载站、爱发电、Gitee、天眼查、爱企查、企查查、优设网、51CTO、力扣、花瓣网、飞书、Epic、Steam、语雀、牛客网、哔哩哔哩、少数派、5ch、金山文档、石墨文档、urlshare、酷安、网盘分享、腾讯云开发者社区、腾讯兔小巢、云栖社区、NodeSeek、亿企查、异次元软件、HelloGitHub、知更鸟、巴哈姆特、ABABTOOLS、阿里云帮助中心、LINUX DO
// @author sakura-flutter
// @namespace https://github.com/sakura-flutter/tampermonkey-scripts
// @license GPL-3.0
Expand Down Expand Up @@ -81,6 +81,7 @@ export default isProd =>
// @match *://ref.gamer.com.tw/redir.php*
// @match *://ababtools.com/?plugin=redirect_page*
// @match *://help.aliyun.com/redirect*
// @match *://linux.do/*
// @include ${/^https?:\/\/www\.google\..{2,7}url/}
// ==/UserScript==
`
6 changes: 6 additions & 0 deletions src/scripts/redirect/sites/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { weixin } from './mp-weixin-qq-com'
import { weixin as weixin2 } from './weixin110-qq-com'
import { doc360 } from './www-360doc-com'
import { pixiv } from './www-pixiv-net'
import { linuxDo } from './linux-do'
import type { Site } from '../types'

const sites: Site[] = [
Expand Down Expand Up @@ -435,6 +436,11 @@ const sites: Site[] = [
query: 'targetUrl',
}),
},
{
name: 'LINUX DO',
test: /^linux\.do\//,
use: linuxDo,
},
]

export default sites
16 changes: 16 additions & 0 deletions src/scripts/redirect/sites/linux-do.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function continueExternalLink() {
const modal = document.querySelector('.external-link-modal')?.closest('.d-modal')

modal?.querySelector<HTMLButtonElement>('.d-modal__footer .btn-primary')?.click()
}

export const linuxDo = () => {
new MutationObserver(continueExternalLink).observe(document.documentElement, {
childList: true,
subtree: true,
})

continueExternalLink()

return {}
}