File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = isProd =>
2
2
`// ==UserScript==
3
3
// @name redirect 外链跳转
4
- // @version 1.12 .0
5
- // @description 自动跳转(重定向)到目标链接,免去点击步骤。适配了简书、知乎、微博、QQ邮箱、QQPC、印象笔记、贴吧、CSDN、YouTube、微信、微信开放社区、开发者知识库、豆瓣、个人图书馆
4
+ // @version 1.13 .0
5
+ // @description 自动跳转(重定向)到目标链接,免去点击步骤。适配了简书、知乎、微博、QQ邮箱、QQPC、印象笔记、贴吧、CSDN、YouTube、微信、微信开放社区、开发者知识库、豆瓣、个人图书馆、Pixiv
6
6
// @author sakura-flutter
7
7
// @namespace https://github.com/sakura-flutter/tampermonkey-scripts
8
8
// @license GPL-3.0
@@ -24,5 +24,6 @@ module.exports = isProd =>
24
24
// @match *://www.itdaan.com/link/*
25
25
// @match *://www.douban.com/link2/*
26
26
// @match *://www.360doc.com/content/*
27
+ // @match *://www.pixiv.net/jump.php*
27
28
// ==/UserScript==
28
29
`
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { weixinDevelopers } from './developers-weixin-qq-com'
12
12
import { itdaan } from './www-itdaan-com'
13
13
import { douban } from './www-douban-com'
14
14
import { doc360 } from './www-360doc-com'
15
+ import { pixiv } from './www-pixiv-net'
15
16
16
17
const sites = [
17
18
{
@@ -92,6 +93,11 @@ const sites = [
92
93
readyState : 'interactive' ,
93
94
use : doc360 ,
94
95
} ,
96
+ {
97
+ name : 'Pixiv' ,
98
+ test : / ^ w w w \. p i x i v \. n e t \/ j u m p .p h p $ / ,
99
+ use : pixiv ,
100
+ } ,
95
101
]
96
102
97
103
export default sites
Original file line number Diff line number Diff line change
1
+ import { parse } from '@/utils/querystring'
2
+
3
+ export const pixiv = ( ) => {
4
+ let link
5
+ // 链接居然是直接拼在url上的
6
+ // https://www.pixiv.net/jump.php?https%3A%2F%2Fwww.huawei.com%2Fcn%2Fcorporate-information
7
+ for ( const [ key , value ] of Object . entries ( parse ( ) ) ) {
8
+ try { link ||= new URL ( key ) . href } catch { }
9
+ try { link ||= new URL ( value ) . href } catch { }
10
+ }
11
+
12
+ return {
13
+ link,
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments