Mercurial > ec-userscripts
diff pixiv-direct-external-link.user.js @ 33:28505554a8b9
(none)
author | Edho Arief <me@myconan.net> |
---|---|
date | Sun, 25 Dec 2016 07:41:17 +0000 |
parents | 4b13157ae3a1 |
children | 32a213717e6a |
line wrap: on
line diff
--- a/pixiv-direct-external-link.user.js Sat Dec 24 04:41:13 2016 +0000 +++ b/pixiv-direct-external-link.user.js Sun Dec 25 07:41:17 2016 +0000 @@ -1,7 +1,7 @@ // ==UserScript== // @name pixiv direct external link // @namespace https://myconan.net -// @version 1.1.0 +// @version 1.1.1 // @description Make proper link on pixiv pages // @author nanaya // @match http://www.pixiv.net/* @@ -10,14 +10,15 @@ // ==/UserScript== ;(function() { + "use strict"; + var fixLink = function(_i, el) { - var - $el = $(el), - url = decodeURIComponent($el.attr('href').replace(/^\/?jump.php\?/, "")); + var $el = $(el) + var url = decodeURIComponent($el.attr("href").replace(/^\/?jump.php\?/, "")) - $el.attr('href', url); - }; + $el.attr("href", url) + } - $("[href^='jump.php?']").each(fixLink); - $("[href^='/jump.php?']").each(fixLink); + $("[href^='jump.php?']").each(fixLink) + $("[href^='/jump.php?']").each(fixLink) }).call(); \ No newline at end of file