Mercurial > ec-userscripts
diff rakuten-books-direct-search.user.js @ 66:444b17e657be
Standardize code style
author | nanaya <me@nanaya.pro> |
---|---|
date | Wed, 10 Jul 2019 22:36:31 +0900 |
parents | 72ef6fcdff44 |
children | 521dda0a0b6f |
line wrap: on
line diff
--- a/rakuten-books-direct-search.user.js Wed Jul 10 22:30:14 2019 +0900 +++ b/rakuten-books-direct-search.user.js Wed Jul 10 22:36:31 2019 +0900 @@ -12,14 +12,15 @@ // @downloadURL https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/rakuten-books-direct-search.user.js // ==/UserScript== -;(function() { - "use strict"; - - var $ = jQuery; - var $form = $("form[name='srchFrm']"); +/* global jQuery */ +;(function () { + 'use strict' - if (!$form.length) { return; } + var $ = jQuery + var $form = $("form[name='srchFrm']") - var searchUrl = $form.find("input[name='R2']").attr("value"); - $form.attr("action", searchUrl); -}).call(); + if (!$form.length) { return } + + var searchUrl = $form.find("input[name='R2']").attr('value') + $form.attr('action', searchUrl) +}).call()