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