Mercurial > ec-userscripts
diff 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 |
line wrap: on
line diff
--- a/pixiv-direct-external-link.user.js Wed Jul 10 22:30:14 2019 +0900 +++ b/pixiv-direct-external-link.user.js Wed Jul 10 22:36:31 2019 +0900 @@ -9,16 +9,17 @@ // @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\?/, "")); +/* global $ */ +;(function () { + 'use strict' - $el.attr("href", url); - }; + var fixLink = function (_i, el) { + var $el = $(el) + var url = decodeURIComponent($el.attr('href').replace(/^\/?jump.php\?/, '')) - $("[href^='jump.php?']").each(fixLink); - $("[href^='/jump.php?']").each(fixLink); -}).call(); + $el.attr('href', url) + } + + $("[href^='jump.php?']").each(fixLink) + $("[href^='/jump.php?']").each(fixLink) +}).call()