comparison 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
comparison
equal deleted inserted replaced
65:72ef6fcdff44 66:444b17e657be
7 // @match http://www.pixiv.net/* 7 // @match http://www.pixiv.net/*
8 // @grant none 8 // @grant none
9 // @downloadURL https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/pixiv-direct-external-link.user.js 9 // @downloadURL https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/pixiv-direct-external-link.user.js
10 // ==/UserScript== 10 // ==/UserScript==
11 11
12 ;(function() { 12 /* global $ */
13 "use strict"; 13 ;(function () {
14 'use strict'
14 15
15 var fixLink = function(_i, el) { 16 var fixLink = function (_i, el) {
16 var $el = $(el); 17 var $el = $(el)
17 var url = decodeURIComponent($el.attr("href").replace(/^\/?jump.php\?/, "")); 18 var url = decodeURIComponent($el.attr('href').replace(/^\/?jump.php\?/, ''))
18 19
19 $el.attr("href", url); 20 $el.attr('href', url)
20 }; 21 }
21 22
22 $("[href^='jump.php?']").each(fixLink); 23 $("[href^='jump.php?']").each(fixLink)
23 $("[href^='/jump.php?']").each(fixLink); 24 $("[href^='/jump.php?']").each(fixLink)
24 }).call(); 25 }).call()