Mercurial > ec-userscripts
view pixiv-direct-external-link.user.js @ 57:09f735548b2c
No more snippets
author | nanaya <me@nanaya.pro> |
---|---|
date | Fri, 20 Jul 2018 00:43:27 +0900 |
parents | 2e1cae72a63e |
children | 960d452dea99 |
line wrap: on
line source
// ==UserScript== // @name pixiv direct external link // @namespace https://myconan.net // @version 1.1.1 // @description Make proper link on pixiv pages // @author nanaya // @match http://www.pixiv.net/* // @grant none // @downloadURL https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/pixiv-direct-external-link.user.js // ==/UserScript== ;(function() { "use strict"; var fixLink = function(_i, el) { var $el = $(el); var url = decodeURIComponent($el.attr("href").replace(/^\/?jump.php\?/, "")); $el.attr("href", url); }; $("[href^='jump.php?']").each(fixLink); $("[href^='/jump.php?']").each(fixLink); }).call();