Mercurial > ec-userscripts
comparison pixiv-direct-external-link.user.js @ 108:2c4470b73ad9
Switch to semistandard
No more `;` at the start of line.
author | nanaya <me@nanaya.net> |
---|---|
date | Sun, 15 Jan 2023 23:24:03 +0900 |
parents | 9c8cde985caf |
children | ef21ef445fc6 |
comparison
equal
deleted
inserted
replaced
107:4bc5a633437c | 108:2c4470b73ad9 |
---|---|
8 // @grant none | 8 // @grant none |
9 // @downloadURL https://hg.myconan.net/ec-userscripts/raw-file/tip/pixiv-direct-external-link.user.js | 9 // @downloadURL https://hg.myconan.net/ec-userscripts/raw-file/tip/pixiv-direct-external-link.user.js |
10 // ==/UserScript== | 10 // ==/UserScript== |
11 | 11 |
12 /* global $ */ | 12 /* global $ */ |
13 ;(function () { | 13 (function () { |
14 'use strict' | 14 'use strict'; |
15 | 15 |
16 const fixLink = function (_i, el) { | 16 const fixLink = function (_i, el) { |
17 const $el = $(el) | 17 const $el = $(el); |
18 const url = decodeURIComponent($el.attr('href').replace(/^\/?jump.php\?/, '')) | 18 const url = decodeURIComponent($el.attr('href').replace(/^\/?jump.php\?/, '')); |
19 | 19 |
20 $el.attr('href', url) | 20 $el.attr('href', url); |
21 } | 21 }; |
22 | 22 |
23 $("[href^='jump.php?']").each(fixLink) | 23 $("[href^='jump.php?']").each(fixLink); |
24 $("[href^='/jump.php?']").each(fixLink) | 24 $("[href^='/jump.php?']").each(fixLink); |
25 }).call() | 25 }).call(); |