Mercurial > ec-userscripts
annotate pixiv-direct-external-link.user.js @ 66:444b17e657be
Standardize code style
author | nanaya <me@nanaya.pro> |
---|---|
date | Wed, 10 Jul 2019 22:36:31 +0900 |
parents | 3381a9cb88d1 |
children | 521dda0a0b6f |
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 | |
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() |