aboutsummaryrefslogtreecommitdiff
path: root/views/script/win_global.js
blob: 3609af7fcf51a9d57077e5b94b2bbd1d3a5c5fe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if (native) {global.$ = require('jquery');} else {var script = document.createElement('script');script.src = '../webinit/jquery.js';script.type = 'text/javascript';document.getElementsByTagName('head')[0].appendChild(script);}
$("#box").fadeOut(0);
setTimeout(() => {
    $("#box").fadeIn(500);
}, 200)

keysEnabled = true;
$(document).keydown(function(e) {
    if (keysEnabled) {
        if (e.keyCode === 13 || e.keyCode === 88 || e.keyCode === 32 || e.keyCode === 27 || e.keyCode === 8 || e.keyCode === 16) { // enter/esc
            Sound.click();
            require('electron').ipcRenderer.send('prefademusic', "");
            $("#box").fadeOut(500);
            setTimeout(() => {
                info("GWinWindow", "Switching control to MenuWindow");
                location.href = "menu.html";
            }, 3000)
        }
    }
})

info("GWinWindow", "Rendered!");