GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 2159f9...025e3d )
by Vladimir
01:15
created

src/public/js/app.js   A

Complexity

Total Complexity 5
Complexity/F 2.5

Size

Lines of Code 44
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
c 1
b 0
f 0
nc 1
dl 0
loc 44
rs 10
wmc 5
mnd 3
bc 5
fnc 2
bpm 2.5
cpm 2.5
noi 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
B socket.log 0 34 4
A window.onscroll 0 5 1
1
var socket = io.connect();
0 ignored issues
show
Bug introduced by
The variable io seems to be never declared. If this is a global, consider adding a /** global: io */ 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...
2
var streamId = window.location.pathname.substring(1);
3
var autoScrool = true;
4
5
window.onscroll = function(e) {
0 ignored issues
show
Unused Code introduced by
The parameter e is not used and could be removed.

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.

Loading history...
6
  autoScrool = (
7
    (window.innerHeight + window.scrollY) >= document.body.offsetHeight
8
  );
9
};
10
11
socket.on('log', function(data) {
12
  if (data.streamId === streamId) {
13
    if (data.format === 'json') {
14
      var p = document.createElement('p');
15
16
      var d = document.createElement('div');
17
      d.className = 'tags';
18
19
      var s1 = document.createElement('span');
20
      s1.className = 'date';
21
      s1.innerHTML = (new Date()).toLocaleDateString(
22
        'en-GB',
23
        {hour: '2-digit', minute: '2-digit', second: '2-digit'}
24
      );
25
      d.appendChild(s1);
26
27
      var s2 = document.createElement('span');
28
      s2.className = 'ip';
29
      s2.innerHTML = data.ip;
30
      d.appendChild(s2);
31
32
      var c = document.createElement('code');
33
      c.className = 'blink';
34
      c.innerHTML = JSON.stringify(data.data);
35
36
      p.appendChild(d);
37
      p.appendChild(c);
38
      document.getElementById('root').appendChild(p);
39
      if (autoScrool === true) {
40
        window.scrollTo(0, document.body.scrollHeight);
41
      }
42
    }
43
  }
44
});
45