-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
232 lines (195 loc) · 9.5 KB
/
index.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
<title>Qwertycoin - Official Mining Pool</title>
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Qwertycoin | #1 Mining Pool - [QWC]" />
<meta property="og:description" content="Welcome to the official developer Qwertycoin Mining Pool. A safe and secure way to mine QWC without fees on rewards or transactions." />
<meta property="og:url" content="https://pool.qwertycoin.org" />
<meta property="og:site_name" content="Qwertycoin | #1 Mining Pool - [QWC]" />
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.6.3/jquery.timeago.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="themes/default.css" rel="stylesheet">
<link href="themes/custom.css" rel="stylesheet">
</head>
<body>
<div id="wrapper">
<!-- Navigation -->
<div class="nav-side-menu">
<div class="brand"><a href="/"><span id="coinSymbol"></span> <span data-tkey="miningPool">Mining Pool</span></a></div>
<i class="fa fa-bars fa-2x toggle-btn" data-toggle="collapse" data-target="#menu-content"></i>
<div class="menu-list">
<ul id="menu-content" class="menu-content collapsed out">
<li><a class="hot_link" data-page="home.html" href="#">
<i class="fa fa-home"></i> <span data-tkey="dashboard">Dashboard</span>
</a></li>
<li><a class="hot_link" data-page="worker_stats.html" href="#worker_stats">
<i class="fa fa-dashboard"></i> <span data-tkey="yourStats">Worker Statistics</span>
</a></li>
<li><a class="hot_link" data-page="getting_started.html" href="#getting_started">
<i class="fa fa-rocket"></i> <span data-tkey="gettingStarted">Getting Started</span>
</a></li>
<li><a class="hot_link" data-page="pool_blocks.html" href="#pool_blocks">
<i class="fa fa-cubes"></i> <span data-tkey="poolBlocks">Pool Blocks</span>
</a></li>
<li><a class="hot_link" data-page="payments.html" href="#payments">
<i class="fa fa-money"></i> <span data-tkey="payments">Payments</span>
</a></li>
<li><a class="hot_link" data-page="top10miners.html" href="#top10miners">
<i class="fa fa-trophy"></i> <span data-tkey="top10miners">Top 10 miners</span>
</a></li>
<li><a class="hot_link" data-page="market.html" href="#market">
<i class="fa fa-bank"></i> <span data-tkey="market">Market / Calculator</span>
</a></li>
<li><a class="hot_link" data-page="settings.html" href="#settings">
<i class="fa fa-gears"></i> <span data-tkey="settings">Settings</span>
</a></li>
<li><a class="hot_link" data-page="faq.html" href="#faq">
<i class="fa fa-comments"></i> <span data-tkey="faq">FAQ</span>
</a></li>
</ul>
</div>
</div>
<!-- Top Bar -->
<div id="top-bar">
<div><span data-tkey="network">Network</span>: <strong><span id="g_networkHashrate"><span data-tkey="na">N/A</span></span></strong></div>
<div><span data-tkey="pool">Pool</span>: <strong><span id="g_poolHashrate"><span data-tkey="na">N/A</span></span></strong></div>
<div><span data-tkey="you">You</span>: <strong><span id="g_userHashrate"><span data-tkey="na">N/A</span></span></strong></div>
<div id="section"><span tkey="luck">Luck</span>: <strong><span id="g_poolLuck"><span tkey="na">N/A</span></span></strong></div>
<div><span id="statsUpdated"><span data-tkey="statsUpdated">Stats Updated</span> <i class="fa fa-bolt"></i></span></div>
<div id="langSelector"></div>
</div>
<!-- Page content -->
<div id="page-wrapper">
<div id="page"></div>
<p id="loading" class="text-center"><i class="fa fa-circle-o-notch fa-spin"></i></p>
</div>
</div>
<!-- Footer -->
<footer>
<div class="text-muted">
<span data-tkey="poweredBy">Powered by</span> <a target="_blank" href="https://github.com/muscleman/cryptonote-nodejs-pool"><i class="fa fa-github"></i> cryptonote-nodejs-pool</a>
<span id="poolVersion"></span>
<span class="hidden-xs"><span data-tkey="openSource">open sourced under the</span> <a href="http://www.gnu.org/licenses/gpl-2.0.html">GPL</a></span>
</div>
</footer>
<!-- Javascript -->
<script src="config.js"></script>
<script src="lang/languages.js"></script>
<script src="js/common.js"></script>
<script src="js/custom.js"></script>
<script>
// Store last pool statistics
var lastStats;
// Get current miner address
function getCurrentAddress() {
var urlWalletAddress = location.search.split('wallet=')[1] || 0;
var address = urlWalletAddress || docCookies.getItem('mining_address');
return address;
}
// Pulse live update
function pulseLiveUpdate(){
var stats_update = document.getElementById('statsUpdated');
stats_update.style.transition = 'opacity 100ms ease-out';
stats_update.style.opacity = 1;
setTimeout(function(){
stats_update.style.transition = 'opacity 7000ms linear';
stats_update.style.opacity = 0;
}, 500);
}
// Update live informations
function updateLiveStats(data) {
pulseLiveUpdate();
lastStats = data;
if (lastStats && lastStats.pool && lastStats.pool.totalMinersPaid.toString() == '-1'){
lastStats.pool.totalMinersPaid = 0;
}
updateIndex();
if (currentPage) currentPage.update();
}
// Update global informations
function updateIndex(){
updateText('coinSymbol', lastStats.config.symbol);
updateText('g_networkHashrate', getReadableHashRateString(lastStats.network.difficulty / lastStats.config.coinDifficultyTarget) + '/sec');
updateText('g_poolHashrate', getReadableHashRateString(lastStats.pool.hashrate) + '/sec');
if (lastStats.miner && lastStats.miner.hashrate){
updateText('g_userHashrate', getReadableHashRateString(lastStats.miner.hashrate) + '/sec');
}
else{
updateText('g_userHashrate', 'N/A');
}
if (lastStats.pool.totalDiff && lastStats.pool.totalShares)
$('#g_poolLuck').html(formatLuck(lastStats.pool.totalDiff, lastStats.pool.totalShares));
updateText('poolVersion', lastStats.config.version);
}
// Load live statistics
function loadLiveStats(reload) {
var apiURL = api + '/stats';
var address = getCurrentAddress();
if (address) { apiURL = apiURL + '?address=' + encodeURIComponent(address); }
if (xhrLiveStats) xhrLiveStats.abort();
$.get(apiURL, function(data){
updateLiveStats(data);
if (!reload) routePage(fetchLiveStats);
});
}
// Fetch live statistics
var xhrLiveStats;
function fetchLiveStats() {
var apiURL = api + '/live_stats';
var address = getCurrentAddress();
if (address) { apiURL = apiURL + '?address=' + encodeURIComponent(address); }
xhrLiveStats = $.ajax({
url: apiURL,
dataType: 'json',
cache: 'false'
}).done(function(data){
updateLiveStats(data);
}).always(function(){
fetchLiveStats();
});
}
// Initialize
$(function(){
// Load current theme if not default
if (themeCss && themeCss != 'themes/default.css') {
$("head").append("<link rel='stylesheet' href=" + themeCss + ">");
}
// Add support informations to menu
if (typeof telegram !== 'undefined' && telegram) {
$('#menu-content').append('<li><a target="_new" href="'+telegram+'"><i class="fa fa-telegram"></i> <span data-tkey="telegram">Telegram group</span></a></li>');
}
if (typeof discord !== 'undefined' && discord) {
$('#menu-content').append('<li><a target="_new" href="'+discord+'"><i class="fa fa-ticket"></i> <span data-tkey="discord">Discord</span></a></li>');
}
if (typeof email !== 'undefined' && email) {
$('#menu-content').append('<li><a target="_new" href="mailto:'+email+'"><i class="fa fa-envelope"></i> <span data-tkey="contactUs">Contact Us</span></a></li>');
}
if (typeof facebook !== 'undefined' && facebook) {
$('#menu-content').append('<li><a target="_new" href="'+facebook+'"><i class="fa fa-facebook"></i> <span data-tkey="facebook">Facebook</span></a></li>');
}
if (typeof langs !== 'undefined' && langs) {
$('#menu-content').append('<div id="mLangSelector"></div>');
renderLangSelector();
}
// Load live statistics for the first time
loadLiveStats();
});
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-168051001-6"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-168051001-6');
</script>
</body>
</html>