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 $ */
|
108
|
13 (function () {
|
|
14 'use strict';
|
14
|
15
|
85
|
16 const fixLink = function (_i, el) {
|
108
|
17 const $el = $(el);
|
|
18 const url = decodeURIComponent($el.attr('href').replace(/^\/?jump.php\?/, ''));
|
14
|
19
|
108
|
20 $el.attr('href', url);
|
|
21 };
|
66
|
22
|
108
|
23 $("[href^='jump.php?']").each(fixLink);
|
|
24 $("[href^='/jump.php?']").each(fixLink);
|
|
25 }).call();
|