forked from KamalChaya/WebDeck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.js
More file actions
29 lines (25 loc) · 809 Bytes
/
init.js
File metadata and controls
29 lines (25 loc) · 809 Bytes
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
//Global Objects
var card_array = new Array();
var card_map = new Array();
var network = new mk_network();
var select = new mk_selection();
var player = new mk_player();
//Global Variables
var top_z = 70;
var last_update = (8 * 3600) + 1; //The EPOCH was 16:00 our time........... The server has a locale!
//This global event listener will release all
// locks when the user clicks on something
// other than cards.
window.onclick = function(e)
{
if(e.button == 0 && e.target.name != "test"){
//We got a left click, release all locks
select.release_locks();
}
}
//This small function removes the browser's context
// menu from appearing on a right click
//We have overwritten this functionality.
document.addEventListener("contextmenu", function(e){
e.preventDefault();
}, false);