We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | "use strict"; |
||
2 | |||
3 | (function() { |
||
4 | |||
5 | /** global availableMoves, submitMoveHREF */ |
||
6 | |||
7 | function submitMove(data) { |
||
8 | var e = $(this); |
||
9 | data.toX = e.data('x'); |
||
10 | data.toY = e.data('y'); |
||
11 | ajaxLink(submitMoveHREF, {callback: highlightMoves, params: data}); |
||
0 ignored issues
–
show
The variable
highlightMoves seems to be never declared. If this is a global, consider adding a /** global: highlightMoves */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN.
Loading history...
|
|||
12 | } |
||
13 | |||
14 | function bindOne(func, arg) { |
||
15 | return function() { |
||
16 | return func.call(this, arg); |
||
17 | }; |
||
18 | } |
||
19 | |||
20 | window.highlightMoves = function() { |
||
21 | var highlighted = $('.chessHighlight'); |
||
22 | if (highlighted.length === 0) { |
||
23 | var e = $(this); |
||
24 | var x = e.data('x'); |
||
25 | var y = e.data('y'); |
||
26 | var boundSubmitMove = bindOne(submitMove, {x:x,y:y}); |
||
27 | $(availableMoves[y][x]).addClass('chessHighlight').each(function(i, e) { |
||
0 ignored issues
–
show
The variable
availableMoves seems to be never declared. If this is a global, consider adding a /** global: availableMoves */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN.
Loading history...
|
|||
28 | e.onclick = boundSubmitMove; |
||
29 | }); |
||
30 | } else { |
||
31 | highlighted.removeClass('chessHighlight').each(function(i, e){ |
||
32 | e.onclick = highlightMoves; |
||
0 ignored issues
–
show
The variable
highlightMoves seems to be never declared. If this is a global, consider adding a /** global: highlightMoves */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN.
Loading history...
|
|||
33 | }); |
||
34 | } |
||
35 | }; |
||
36 | |||
37 | })(); |
||
38 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.