Conditions | 3 |
Paths | 3 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | (function(){ |
||
4 | $('#settings-search').on('keyup',function(e){ |
||
|
|||
5 | var query = $(this).val().toLowerCase(), |
||
6 | matches = []; |
||
7 | |||
8 | if(query.length > 1) { |
||
9 | $fields.hide().each(function(){ |
||
10 | var $field = $(this), |
||
11 | title = $field.attr('data-title').toLowerCase(); |
||
12 | |||
13 | if(title.match(query)){ |
||
14 | matches.push($field); |
||
15 | } |
||
16 | }); |
||
17 | |||
18 | $(matches).map(function(){return this.toArray();}).show(); |
||
19 | |||
20 | $('#settings-search-results').text(matches.length ? matches.length+' settings found' : 'Nothing found'); |
||
21 | } |
||
22 | else { |
||
23 | $fields.show(); |
||
24 | $('#settings-search-results').text(''); |
||
25 | } |
||
26 | }); |
||
27 | })(); |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.