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 ( a81772...31c2e9 )
by Vladimir
31s
created

src/public/js/app.js   A

Complexity

Total Complexity 4
Complexity/F 1.33

Size

Lines of Code 32
Function Count 3

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 32
rs 10
wmc 4
mnd 1
bc 4
fnc 3
bpm 1.3333
cpm 1.3333
noi 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A app.js ➔ ??? 0 5 1
1
/** global: io */
2
const socket = io.connect();
3
const streamId = window.location.pathname.substring(1);
4
let autoScrool = true;
0 ignored issues
show
Unused Code introduced by
The variable autoScrool seems to be never used. Consider removing it.
Loading history...
5
6
/**
7
 * Auto-scrolling to latest data.
8
 */
9
window.addEventListener('onscroll', () => {
10
  autoScrool = (
0 ignored issues
show
Unused Code introduced by
The variable autoScrool seems to be never used. Consider removing it.
Loading history...
11
    (window.innerHeight + window.scrollY) >= document.body.offsetHeight
12
  );
13
});
14
15
/**
16
 * Handler for WebSocket 'connect' event.
17
 * Emits 'join' event which is intended to join WebSocket room for current streamId.
18
 */
19
socket.on('connect', () => {
20
  socket.emit('join', streamId);
21
});
22
23
/**
24
 * Handler for new data.
25
 * Renders data on web page (add to the bottom).
26
 *
27
 * @event LOG.NEW
28
 */
29
socket.on('log', (data) => {
30
  if (data.format === 'json') {
31
    renderJson(data);
32
  }
33
});
34