Total Complexity | 3 |
Complexity/F | 1 |
Lines of Code | 20 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | /** |
||
4 | document.getElementById('menuNews').addEventListener('click', () => { |
||
5 | document.getElementById('news').style.display = 'block'; |
||
6 | }); |
||
7 | |||
8 | /** |
||
9 | * Handler for close image, which is close (hide) parent element. |
||
10 | */ |
||
11 | document.getElementById('close').addEventListener('click', (e) => { |
||
12 | e.target.parentElement.style.display = 'none'; |
||
13 | }); |
||
14 | |||
15 | /** |
||
16 | * Auto-scrolling to latest data. |
||
17 | */ |
||
18 | window.addEventListener('onscroll', () => { |
||
19 | /** global: app */ |
||
20 | app.autoScrool = ( |
||
21 | (window.innerHeight + window.scrollY) >= document.body.offsetHeight |
||
22 | ); |
||
23 | }); |
||
24 |