aboutsummaryrefslogtreecommitdiff
path: root/src/js/app.js
blob: 06ba891cec1510fbc9e98d7ad4b7ae97b242916c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* Arching Kaos Web UI App Launcher
 *
 * Kaotisk Hund - 2024
 *
 * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
 *
 *
 * Body and pageLayout resizer to device's resolution.
 *
 * TODO: Figure out why it doesn't work in fullscreen App mode (android)
 *
 */
body.width = window.innerWidth;
body.height = window.innerHeight;
pageLayout.width = window.innerWidth;
pageLayout.height = window.innerHeight;
mainContainer.style.display = 'block';
window.innerWidth <= 770 ? isMobile = true : isMobile = false;
isMobile ? doubleFloorMenu.style.display = 'none':doubleFloorMenu.style.display = 'flex';
function onWindowResize()
{
    body.width = window.innerWidth;
    body.height = window.innerHeight;
    pageLayout.width = window.innerWidth;
    pageLayout.height = window.innerHeight;
    window.innerWidth <= 770 ? isMobile = true : isMobile = false;
    isMobile ? doubleFloorMenu.style.display = 'none':doubleFloorMenu.style.display = 'flex';
}
window.addEventListener('resize', onWindowResize, false);

// And call
menuinit();
locationHashOnChange();

progressPlaceholder.value = '0';

progressPlaceholder.max++;

if ( settings.stellar.scan )
{
    scanStellarNetworkForPeers();
}

if ( settings.ak.scan )
{
    ringlocalbell();
    setInterval(ringlocalbell, 10*60*1000);
}

//scanStellarNetworkForPeers();
// setInterval(scanStellarNetworkForPeers, 60000);

var root = {
    head: document.querySelector('head'),
    body: document.querySelector('body'),
    html: document.querySelector('html')
};

var scripts = [
    {
        element:"script",
        src:"./js/ui/mainLayout.js"
    },
    {
        element:"script",
        src:"./js/page-navigation.js"
    },
    {
        element:"script",
        src:"./js/page-projects.js"
    },
    {
        element:"script",
        src:"./js/menu.js"
    }
];

for ( var i = 0; i < scripts.length; i++ )
{
    makeElement(scripts[i], root.body);
}
// vim: tabstop=4 shiftwidth=4 expandtab softtabstop=4
// @license-end