comparison pixiv-direct-external-link.user.js @ 14:6415f831aa5a

(none)
author Edho Arief <me@myconan.net>
date Mon, 21 Sep 2015 06:34:01 +0000
parents
children aa43130ad87f
comparison
equal deleted inserted replaced
13:06e6dbdedd47 14:6415f831aa5a
1 // ==UserScript==
2 // @name pixiv direct external link
3 // @namespace https://myconan.net
4 // @version 1.0
5 // @description Make proper link on pixiv pages
6 // @author nanaya
7 // @match http://www.pixiv.net/*
8 // @grant none
9 // ==/UserScript==
10
11 ;(function() {
12 var fixLink = function(_i, el) {
13 var
14 $el = $(el),
15 url = decodeURIComponent($el.attr('href').replace(/^\/?jump.php\?/, ""));
16
17 $el.attr('href', url);
18 };
19
20 $("[href^='jump.php?']").each(fixLink);
21 $("[href^='/jump.php?']").each(fixLink);
22 }).call();