14
|
1 // ==UserScript==
|
|
2 // @name pixiv direct external link
|
|
3 // @namespace https://myconan.net
|
77
|
4 // @version 1.1.4
|
14
|
5 // @description Make proper link on pixiv pages
|
|
6 // @author nanaya
|
|
7 // @match http://www.pixiv.net/*
|
|
8 // @grant none
|
77
|
9 // @downloadURL https://hg.sr.ht/~nanaya/ec-userscripts/raw/pixiv-direct-external-link.user.js?rev=tip
|
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()
|