Mercurial > ec-userscripts
annotate pixiv-direct-external-link.user.js @ 58:960d452dea99
Bump version to force updating to new repository
author | nanaya <me@nanaya.pro> |
---|---|
date | Thu, 23 Aug 2018 22:58:16 +0900 |
parents | 09f735548b2c |
children | 3381a9cb88d1 |
rev | line source |
---|---|
14 | 1 // ==UserScript== |
2 // @name pixiv direct external link | |
3 // @namespace https://myconan.net | |
58
960d452dea99
Bump version to force updating to new repository
nanaya <me@nanaya.pro>
parents:
57
diff
changeset
|
4 // @version 1.1.2 |
14 | 5 // @description Make proper link on pixiv pages |
6 // @author nanaya | |
7 // @match http://www.pixiv.net/* | |
8 // @grant none | |
57 | 9 // @downloadURL https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/pixiv-direct-external-link.user.js |
14 | 10 // ==/UserScript== |
11 | |
12 ;(function() { | |
33 | 13 "use strict"; |
14 | |
14 | 15 var fixLink = function(_i, el) { |
49 | 16 var $el = $(el); |
17 var url = decodeURIComponent($el.attr("href").replace(/^\/?jump.php\?/, "")); | |
14 | 18 |
49 | 19 $el.attr("href", url); |
20 }; | |
14 | 21 |
49 | 22 $("[href^='jump.php?']").each(fixLink); |
23 $("[href^='/jump.php?']").each(fixLink); | |
14 | 24 }).call(); |