14
|
1 // ==UserScript==
|
|
2 // @name pixiv direct external link
|
|
3 // @namespace https://myconan.net
|
82
|
4 // @version 1.1.5
|
14
|
5 // @description Make proper link on pixiv pages
|
|
6 // @author nanaya
|
|
7 // @match http://www.pixiv.net/*
|
|
8 // @grant none
|
82
|
9 // @downloadURL https://hg.myconan.net/ec-userscripts/raw-file/tip/pixiv-direct-external-link.user.js
|
14
|
10 // ==/UserScript==
|
|
11
|
66
|
12 /* global $ */
|
|
13 ;(function () {
|
|
14 'use strict'
|
14
|
15
|
66
|
16 var fixLink = function (_i, el) {
|
|
17 var $el = $(el)
|
|
18 var url = decodeURIComponent($el.attr('href').replace(/^\/?jump.php\?/, ''))
|
14
|
19
|
66
|
20 $el.attr('href', url)
|
|
21 }
|
|
22
|
|
23 $("[href^='jump.php?']").each(fixLink)
|
|
24 $("[href^='/jump.php?']").each(fixLink)
|
|
25 }).call()
|