-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
86 lines (76 loc) · 2.12 KB
/
test.js
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
84
85
86
let hotTest = new Hotbar();
hotTest.content = hotTest.getData();
hotTest.options = {
id: "norcHotbar",
template: "templates/hud/customHotbar.html",
popOut: false,
dragDrop: [{ dragSelector: ".macro", dropSelector: "#custom-macro-list" }]
};
hotTest.ID="custom-hotbar";
hotTest.element = "div#custom-hotbar.flexrow";
let obj = {
left: 100,
top: 100,
width: 502,
height: 52,
scale: 1.0,
log: true,
renderContext: "Norc",
renderData: "manual"
};
await hotTest.render(true, obj);
var style = document.createElement('style');
style.innerHTML =
'#custom-hotbar {' +
'z-index: 70;' +
'position: fixed;' +
'bottom: 75px;' +
'left: 220px;' +
'width: 600px;' +
'height: 52px;' +
'box-sizing: border-box;' +
'pointer-events: none;' +
'}' +
'#custom-hotbar #custom-hotbar-directory-controls {' +
'pointer-events: all;' +
'}' +
'#custom-hotbar #custom-hotbar-directory-controls a{' +
'line-height: 24px;' +
'}' +
'#custom-hotbar .bar-controls {' +
'flex: 0 0 32px;' +
'height: 100%;' +
'margin: 0 2px;' +
'text-align: center;' +
'color: #c9c7b8;' +
'background: rgba(0, 0, 0, 0.6);' +
'border: 1px solid #000;' +
'box-shadow: 0 0 3px #444 inset;' +
'border-radius: 3px;' +
'}' +
'#custom-hotbar .bar-controls a{' +
'display: block' +
'}' +
'#hotbar #custom-macro-list {' +
'flex: 0 0 502px;' +
'height: 100%;' +
'list-style: none;' +
'margin: 0 2px;' +
'padding: 0;' +
'border: 1px solid #000;' +
'border-radius: 3px;' +
'}' +
'#hotbar .bar-controls {' +
'flex: 0 0 32px;' +
'height: 100%;' +
'margin: 0 2px;' +
'text-align: center;' +
'color: #c9c7b8;' +
'background: rgba(0, 0, 0, 0.6);' +
'border: 1px solid #000;' +
'box-shadow: 0 0 3px #444 inset;' +
'border-radius: 3px;' +
'}'
;
var ref = document.querySelector('script');
ref.parentNode.insertBefore(style, ref);