forked from lalafellsleep/Samhain.FFXIV-Overlays
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dmgmeter.html
148 lines (134 loc) · 6.26 KB
/
dmgmeter.html
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="css/default.css">
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/0.12.7/vue.min.js"></script>
<script src="lib/react.min.js"></script>
<script src="lib/lodash.min.js"></script>
<script src="app/rdmty.js"></script>
<script>
function onOverlayDataUpdate(e) {
var start = new Date().getTime();
var details = e.detail;
React.render(
React.createElement(DamageMeter, {
parseData: e.detail
}),
document.getElementById('container')
);
//console.log('rendered in ' + (+new Date() - start) + 'ms');
}
document.addEventListener('onOverlayDataUpdate', onOverlayDataUpdate);
document.addEventListener("onOverlayStateUpdate", function (e) {
if (!e.detail.isLocked) {
document.documentElement.classList.add("resizable");
} else {
document.documentElement.classList.remove("resizable");
}
});
window.addEventListener('message', function (e) {
if (e.data.type === 'onOverlayDataUpdate') {
onOverlayDataUpdate(e.data);
}
});
setInterval(function(){
//privbar(true);
//$("#blurcont").height($("#container").height()+12);
}, 50);
</script>
<div id="realcont">
<div id="blurcont">
</div>
<div id="container">
◇ DPS Meter v2016.06.16<br>
Modify by Laiglinne - [EN] Saeris Illyan
</div>
<div id="setainer" style="display:none; padding:10px; color:#FFF;">
<div>Display Name <input id="myname" type="checkbox" checked="checked" />
<input id="mynameval" type="text" value="Me" /></div>
<div>Resize <input type="checkbox" checked="checked" onclick="resizeview();"/></div>
<div>Display Name <input id="showname" type="checkbox" checked="checked" onclick="goTab(currenttab + 1, $('#tab' + currenttab));"/></div>
<div>
<div id="privback" style="border:1px solid rgb(144,216,255); border-radius:3px; background:rgb(23,45,67); height:18px;">
<div id="privbar" style="background:rgb(232,255,254); height:18px; width:50%; border-radius:2px;"></div>
</div>
<div style="border-radius:3px; background: -webkit-linear-gradient(left,
rgba(0,0,0,.5) 0%,
rgba(0,0,0,.5) 5%,
rgba(0,0,0,.25) 15%,
rgba(0,0,0,.0) 100%); z-index:5; height:20px; position:relative; top:-20px; font-family:'맑은 고딕'; color:#FFF; line-height:20px; padding-left:5px; text-shadow:0px 0px 3px rgba(0,0,0,.5);">Preview</div>
</div>
<div>Main Color R<input id="cr" type="number" min="0" max="255" value="232" style="width:40px;" onchange="privbar(false);"/>
G<input id="cg" type="number" min="0" max="255" value="255" style="width:40px;" onchange="privbar(0);"/>
B<input id="cb" type="number" min="0" max="255" value="254" style="width:40px;" onchange="privbar(0);"/>
<button onclick="privbar(1);">Apply</div></div>
</div>
<div id="bottomset">
<div class="chatloglikehandle settingcon" id="viewresize" style="border-bottom-right-radius:0px; float:right;">
</div>
<div class="chatloglikehandle" id="shg">
<div id="tab0" class="pcl handlecont selbg" onclick="goTab(1, $(this));"><div class="handlecont_in">DPS</div></div>
<div id="tab1" class="pcl handlecont2" onclick="goTab(2, $(this));"><div class="handlecont_in handlecont_in2">HPS</div></div>
<div id="tab2" class="pcl handlecont2" onclick="goTab(3, $(this));"><div class="handlecont_in handlecont_in2">Damage</div></div>
<div id="tab3" class="pcl handlecont2" onclick="goTab(4, $(this));"><div class="handlecont_in handlecont_in2">ACC / Crit</div></div>
</div>
<div class="chatloglikehandle settingcon" onclick="toggleset();">
<div class="settingcon_in"><div style="background:url(images/icon.png) no-repeat; background-position:3px 2px; width:20px; height:20px;" /></div>
</div>
</div>
</div>
<script>
var toggle = true;
var viewback = true;
var nicknameshow = true;
var currenttab = 0; // max 3
function privbar(bool)
{
if(bool == 1)
{
$(".self .bar-back").css("background", "rgb("+$("#cr").val()+","+$("#cg").val()+","+$("#cb").val()+")");
}
$("#privbar").css("background", "rgb("+$("#cr").val()+","+$("#cg").val()+","+$("#cb").val()+")");
}
function resizeview()
{
if(!viewback)
$("#viewresize").show();
else
$("#viewresize").hide();
viewback=!viewback;
}
function toggleset()
{
if(toggle)
{
$("#container").hide();
$("#setainer").show();
}
else
{
$("#container").show();
$("#setainer").hide();
}
toggle = !toggle;
}
function goTab(e, obj)
{
$(".chatloglikehandle .pcl").removeClass("selbg");
obj.addClass("selbg");
for(i=currenttab; i<4; i++)
$("#container").find(".chart-view-switcher").trigger("click");
for(i=0; i<e-1; i++)
$("#container").find(".chart-view-switcher").trigger("click");
currenttab = e-1;
}
function tmp(){
$("#container").find(".chart-view-switcher").trigger("click");
$("#container").find(".chart-view-switcher").trigger("click");
}
</script>
</body>
</html>