-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
673 lines (608 loc) · 28.3 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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
<!DOCTYPE html>
<html>
<head>
<title>QONQR zone map</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="shortcut icon" href="https://qonqr.com/Images/favicon.ico/android-icon-192x192.png" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/glify-browser.js"></script>
<script src="https://unpkg.com/[email protected]/leaflet-providers.js"></script>
<script src="https://unpkg.com/[email protected]/dist/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/4.3.7/papaparse.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/spin.js/2.3.2/spin.min.js"></script>
<script src="https://unpkg.com/[email protected]/leaflet.spin.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/leaflet-search.src.js"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/src/leaflet-search.css" />
<script src="https://nuclearsecrecy.github.io/Leaflet.greatCircle/Leaflet.greatCircle.js"></script>
<script src="https://cdn.plot.ly/plotly-2.0.0.min.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-164777450-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-164777450-1');
</script>
<style>
body,
html,
#map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.legend {
color: white;
padding: 10px;
background-color: rgba(0, 0, 0, 0.8);
border-radius: 5px;
}
.uncaptured {
color: orange;
}
.legion {
color: red;
}
.swarm {
color: green;
}
.faceless {
color: purple;
}
.uncapturedBG {
background-color: orange;
}
.legionBG {
background-color: red;
}
.swarmBG {
background-color: green;
}
.facelessBG {
background-color: purple;
}
.link {
text-decoration: underline;
cursor: pointer;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
const zoneControlState = {
0: "uncaptured",
1: "legion",
2: "swarm",
3: "faceless"
}
const colours = {
0: { r: 1, g: 0.647, b: 0 },
1: { r: 1, g: 0, b: 0 },
2: { r: 0, g: 1, b: 0 },
3: { r: 0.5, g: 0, b: 0.5 }
}
const coloursHex = {
0: "#ff9100",
1: "#ff0000",
2: "#00ff00",
3: "#800080",
}
const ranges = {
"Zone Assault": 48,
"Shockwave": 40,
"Plasma Beam": 32,
"Deflection": 40,
"Seekers": 40,
"Absorbers": 40,
"Hardened Lattice": 16,
"Divert": 64,
"Bot Booster": 64,
"Strengthen": 64
}
var range_km = 1609.34;
if (new Date().getUTCDay() == 1) { // Monday
var week = Math.floor(new Date().getUTCDate() / 7);
if (week == 1) {
range_km = 4828.032;
} else if (week == 2) {
range_km = 9656.064;
} else if (week >= 3) {
range_km = 20116.8;
}
}
ranges["Nanomissiles"] = range_km
var map = L.map('map', {
center: [15, 30],
zoom: 3,
maxBounds: [[-90, -360], [90, 360]],
worldCopyJump: true
});
var sql = `SELECT CONCAT(z.Description, ",", r.Description, ",", c.Description) AS Description, Latitude, Longitude FROM zones z
INNER JOIN countries c ON z.countryid=c.countryid
INNER JOIN regions r ON z.regionid=r.regionid
WHERE MATCH (z.DESCRIPTION) AGAINST ("{s}") OR z.ZoneId="{s}"
`;
const API_BASE_URL = "https://api-proxy.auckland-cer.cloud.edu.au/QONQR/"
const WSURL = "wss://api-proxy.auckland-cer.cloud.edu.au/QONQR/websocket"
var search = L.control.search({
url: API_BASE_URL + sql,
formatData: function (data) {
var lookup = [];
for (var zone of data.results) {
lookup[zone.Description] = [zone.Latitude, zone.Longitude]
}
return lookup;
},
marker: L.circleMarker([0,0], {color: "DeepSkyBlue", fillOpacity: 0})
});
map.addControl(search);
map.locate({
setView: true,
maxZoom: 5
}).on("locationfound", function (e) {
L.circle([e.latitude, e.longitude], { color: "cyan", radius: e.accuracy }).bindTooltip("You").addTo(map);
L.greatCircle([e.latitude, e.longitude], { color: "cyan", fillOpacity: 0, weight: .5, radius: ranges.Nanomissiles * 1000, interactive: false }).addTo(map);
});
var baseMaps = {
"OSM": L.tileLayer.provider("OpenStreetMap.Mapnik"),
"OSM Grayscale": L.tileLayer.provider("OpenStreetMap.BlackAndWhite"),
"CartoDB Positron": L.tileLayer.provider('CartoDB.Positron'),
"CartoDB Dark Matter": L.tileLayer.provider("CartoDB.DarkMatter").addTo(map),
"ESRI WorldImagery": L.tileLayer.provider("Esri.WorldImagery"),
"Google Hybrid": L.tileLayer('http://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}', {
maxZoom: 20,
subdomains: ['mt0', 'mt1', 'mt2', 'mt3']
}),
"Wikimedia": L.tileLayer.provider("Wikimedia")
}
var uncaptured = L.layerGroup().addTo(map);
var legion = L.layerGroup().addTo(map);
var swarm = L.layerGroup().addTo(map);
var faceless = L.layerGroup().addTo(map);
var tactical = L.layerGroup().addTo(map);
map.createPane('labels');
map.getPane('labels').style.zIndex = 625;
map.getPane('labels').style.pointerEvents = 'none';
var labels = L.tileLayer.provider("Stamen.TonerLabels", {
pane: "labels",
interactive: false,
opacity: .8,
});
map.createPane('whitelabels');
map.getPane('whitelabels').style.zIndex = 625;
map.getPane('whitelabels').style.pointerEvents = 'none';
map.getPane('whitelabels').style.filter = 'invert(100%)';
var whitelabels = L.tileLayer.provider("Stamen.TonerLabels", {
pane: "whitelabels",
interactive: false,
opacity: .8,
});
var overlays = {
"Uncaptured": uncaptured,
"Legion": legion,
"Swarm": swarm,
"Faceless": faceless,
"Tactical drawings": tactical,
"City labels": labels,
"City labels (white)": whitelabels,
}
L.control.layers(baseMaps, overlays).addTo(map);
var layers = Object.keys(overlays).slice(0,4);
console.log(layers);
window.teamfilter = [0, 1, 2, 3];
window.data = {};
map.on("overlayadd", function (e) {
if (!window.data) return;
layers.push(e.name);
var indices = layers.map(e => Object.keys(overlays).indexOf(e));
window.teamfilter = indices;
updateURL();
query();
}).on("overlayremove", function (e) {
if (!window.data) return;
if (layers.indexOf(e.name) !== -1) {
layers.splice(layers.indexOf(e.name), 1);
var indices = layers.map(e => Object.keys(overlays).indexOf(e));
window.teamfilter = indices;
updateURL();
window.data = {}
query();
}
});
function clamp(num) {
var min = 10;
var max = 50;
return num <= min ? min : num >= max ? max : num;
}
function formatDelta(delta) {
if (!delta) {
return "";
} else if (delta >= 0) {
delta = "+" + delta.toLocaleString();
}
return " (" + delta.toLocaleString() + ")";
}
function buildDescString(d) {
var className = zoneControlState[d.ZoneControlState]
var desc = "<b class='" + className + "'>" + d.Description + "</b>" +
"<br>Zone ID: " + d.ZoneId +
"<br>Captured: " + d.DateCapturedUtc?.slice(0, 19) +
"<br>Last updated: " + d.LastUpdateDateUtc.slice(0, 19) +
"<div class='legion'>Legion: " + d.LegionCount.toLocaleString() + formatDelta(d.LegionDelta) +
"</div><div class='swarm'>Swarm: " + d.SwarmCount.toLocaleString() + formatDelta(d.SwarmDelta) +
"</div><div class='faceless'>Faceless: " + d.FacelessCount.toLocaleString() + formatDelta(d.FacelessDelta) + "</div><div id='battles'></div><div id='plot'></div>";
return desc;
}
function createPointsLayer() {
var data = Object.values(window.data)
console.log(data.length);
var points = data.map(e => [e.Latitude, e.Longitude]);
if (window.pointsLayer) window.pointsLayer.remove()
window.pointsLayer = L.glify.points({
map: map,
size: function (i, e) {
return clamp(data[i].TotalCount / 1E6);
},
color: function (i, e) {
return colours[data[i].ZoneControlState]
},
click: function (e, feature) {
var i = points.indexOf(feature);
var zoneId = data[i].ZoneId;
sql = "SELECT ZoneId,Description,ZoneControlState,DateCapturedUtc,LegionCount,SwarmCount,FacelessCount,LastUpdateDateUtc,Latitude,Longitude,LegionDelta,SwarmDelta,FacelessDelta,TotalCount,TotalDelta FROM zones WHERE zoneId=" + zoneId;
$.getJSON(API_BASE_URL + sql, function(zoneData) {
zoneData = zoneData.results[0]
console.log(zoneData);
var point = e.latlng;
var best_width = Math.min($(window).width() - 100, 800)
L.popup({minWidth: best_width, maxHeight: 500})
.setLatLng(point)
.setContent(buildDescString(zoneData))
.on("add", function(e) {
var px = map.project(point);
console.log(px)
px.y -= 400;
map.panTo(map.unproject(px),{animate: true});
sql = "SELECT * FROM changelog WHERE zoneId=" + zoneId;
$.getJSON(API_BASE_URL + sql, function(changes) {
sql = "SELECT `Battle Report Number`,`Date` FROM battlestats WHERE `Zone ID`=" + zoneId;
$.getJSON(API_BASE_URL + sql, function(battleData) {
console.log(changes);
console.log(battleData)
if (battleData.results) {
var container = $("#battles", e.target._contentNode)[0];
$(container).append("MAZ battles: ")
for (var battle of battleData.results) {
$(container).append(`<a href="https://portal.qonqr.com/Home/BattleStatistics/${battle["Battle Report Number"]}">${battle.Date}</a> `);
}
}
var timestamps = changes.results.map(r => r.LastUpdateDateUtc)
var legion = {
name: "Legion",
x: timestamps,
y: changes.results.map(r => r.LegionCount),
type: 'scatter',
mode: 'lines+markers',
marker: {
color: "rgb(255, 0, 0)",
},
};
var swarm = {
name: "Swarm",
x: timestamps,
y: changes.results.map(r => r.SwarmCount),
type: 'scatter',
mode: 'lines+markers',
marker: {
color: "rgb(0, 255, 0)",
},
};
var faceless = {
name: "Faceless",
x: timestamps,
y: changes.results.map(r => r.FacelessCount),
type: 'scatter',
mode: 'lines+markers',
marker: {
color: "rgb(127, 0, 127)",
},
};
var battles = {
name: "MAZ",
x: battleData.results.map(r => r.Date),
text: battleData.results.map(r => r["Battle Report Number"]),
type: "scatter",
mode: "markers",
marker: {
color: "teal"
}
}
var data = [legion, swarm, faceless, battles];
var layout = {
title: {
text: zoneData.Description,
font: {
color: coloursHex[zoneData.ZoneControlState],
}
}
}
var container = $("#plot", e.target._contentNode)[0];
Plotly.newPlot(container, data, layout);
});
})
})
.openOn(map);
})
},
data: points,
opacity: 1,
//fragmentShaderSource: L.glify.shader.fragment.simpleCircle
});
}
function updateStats(data) {
if (!$("#stats:visible").length) return;
var sql = `SELECT SUM(LegionCount) AS LC, SUM(SwarmCount) AS SC, SUM(FacelessCount) AS FC
FROM zones
WHERE ${getBoundsQueryFragment()}
AND ${getCountQueryFragment()}
AND ${getTimeQueryFragment()}
AND ${getTeamFilterQueryFragment()}
AND ${getPlayerFilterQueryFragment()}
`;
console.log(sql)
$.getJSON(API_BASE_URL + encodeURIComponent(sql), function(stats) {
console.log(stats);
var r = stats.results[0];
$("#stats").html("<div class='legion'>Total Legion bots:" + parseInt(r.LC).toLocaleString() +
"</div><div class='swarm'>Total Swarm bots: " + parseInt(r.SC).toLocaleString() +
"</div><div class='faceless'>Total Faceless bots: " + parseInt(r.FC).toLocaleString() +
"</div><div id='top10'>Top 10 zones:</div>");
var sql = `SELECT CONCAT(z.Description, ",", r.Description, ",", c.Description) AS Description, Latitude, Longitude, ZoneControlState FROM zones z
INNER JOIN countries c ON z.countryid=c.countryid
INNER JOIN regions r ON z.regionid=r.regionid
WHERE ${getBoundsQueryFragment()}
AND ${getCountQueryFragment()}
AND ${getTimeQueryFragment()}
AND ${getTeamFilterQueryFragment()}
AND ${getPlayerFilterQueryFragment()}
ORDER BY TotalDelta DESC
LIMIT 10
`;
console.log(sql);
$.getJSON(API_BASE_URL + encodeURIComponent(sql), function(top10) {
console.log(top10)
for (var d of top10.results) {
var className = zoneControlState[d.ZoneControlState];
$("#top10").append("<div onclick='map.flyTo([" + d.Latitude + "," + d.Longitude + "], 12)' class='link " +
className + "'>" + d.Description + "</div>")
}
});
})
}
function getBoundsQueryFragment() {
var bounds = map.getBounds()
return `Latitude BETWEEN ${bounds.getSouth()} AND ${bounds.getNorth()} AND Longitude BETWEEN ${bounds.getWest()} AND ${bounds.getEast()}`
}
function getCountQueryFragment() {
if (window.countfilter == "contested") {
// Uncaptured zones are by definition uncontested
// A Legion held zone, where the total bot count is not equal to the legion bot count, is contested
return `IF (ZoneControlState = 1 AND TotalCount != LegionCount OR
ZoneControlState = 2 AND TotalCount != SwarmCount OR
ZoneControlState = 3 AND TotalCount != FacelessCount
, 1, 0)`;
} else if (window.countfilter == "colocated") {
return `Colocated = 1`
} else if (typeof(window.countfilter) == "string" && window.countfilter.startsWith("MAZ")) {
return `ZoneId IN (SELECT \`Zone Id\` FROM battlestats GROUP BY \`Zone ID\` HAVING COUNT(*) >= ${window.countfilter.replace("MAZ", "")})`;
} else if (typeof(window.countfilter) == "string" && window.countfilter.startsWith("delta_")) {
return `TotalDelta >= ${window.countfilter.replace("delta_", "")}`;
} else if (window.countfilter == "capnull") {
return `DateCapturedUtc IS NULL`
} else {
return `TotalCount >= ${window.countfilter}`
}
}
function getTimeQueryFragment() {
if (window.timefilter != "all") {
if (window.timefilter.charAt(0) == ">") {
return `LastUpdateDateUtc < date_sub(UTC_DATE(), interval ${window.timefilter.slice(1)})`
} else {
return `LastUpdateDateUtc > date_sub(UTC_DATE(), interval ${window.timefilter})`
}
} else {
return 1
}
}
function getTeamFilterQueryFragment() {
if (window.teamfilter.length) {
return `ZoneControlState IN (${window.teamfilter.join(",")})`
} else {
return 0
}
}
function getPlayerFilterQueryFragment() {
if (window.playerfilter) {
return `ZoneId IN (SELECT \`Zone Id\` FROM battlestats WHERE players LIKE "%${window.playerfilter}%")`;
} else {
return 1
}
}
window.limit = 100000
function query() {
if (!ws.readyState) return;
if (window.pending) return;
window.pending = true;
map.spin(true, {color: "white"});
var sql = `SELECT ZoneId,ZoneControlState,Latitude,Longitude,TotalCount
FROM zones
WHERE ${getBoundsQueryFragment()}
AND ${getCountQueryFragment()}
AND ${getTimeQueryFragment()}
AND ${getTeamFilterQueryFragment()}
AND ${getPlayerFilterQueryFragment()}
ORDER BY TotalCount DESC
LIMIT ${limit}`;
console.log(sql);
ws.send(sql)
}
window.ws = new WebSocket(WSURL);
window.pending = false;
ws.onopen = function() {
query();
}
ws.onmessage = function (evt) {
window.pending = false;
map.spin(false);
var data = JSON.parse(evt.data);
if (data.results.error) {
console.error(data.results.error)
}
console.log(data.results);
for (var zone of data.results) {
window.data[zone.ZoneId] = zone;
}
$("#zones_shown").text(Object.values(window.data).length.toLocaleString() + " zones shown");
// Check colocation
var pointLookup = {}
for (var d of Object.values(window.data)) {
var p = [d.Latitude, d.Longitude]
if (!pointLookup[p]) {
pointLookup[p] = [d];
} else {
d.Longitude += .001 * pointLookup[p].length;
pointLookup[p].push(d);
for (var zone of pointLookup[p]) {
zone.colocated = true;
}
}
}
createPointsLayer()
updateStats();
}
map.on('moveend', function(e) {
query();
});
map.on('click', function(e) {
var formation = $("#formation").val()
if (formation) {
console.log(formation, e)
var range_km = ranges[formation]
L.circle(e.latlng, { color: "cyan", weight: .5, radius: range_km * 1000, interactive: false }).addTo(tactical);
} else {
tactical.clearLayers();
}
});
var legend = L.control({ position: 'bottomright' });
function statsToggle() {
$("#stats").toggle();
updateStats();
}
legend.onAdd = function (map) {
var div = L.DomUtil.create('div', 'info legend');
var formations_HTML = `<select id="formation"><option></option>`
for (var k in ranges) {
formations_HTML += `<option>${k}</option>`
}
formations_HTML += "</select>"
div.innerHTML += `Shows zones with activity <select id="filtertime">
<option value="all">All time</option>
<option value=">6 year">more than 6 years ago</option>
<option value=">5 year">more than 5 years ago</option>
<option value=">4 year">more than 4 years ago</option>
<option value=">3 year">more than 3 years ago</option>
<option value=">2 year">more than 2 years ago</option>
<option value=">1 year">more than 1 year ago</option>
<option value="2 year">in the past 2 years</option>
<option value="1 year">in the past year</option>
<option value="1 month">in the past month</option>
<option value="1 week">in the past week</option>
<option value="1 day" selected>in the past day</option>
</select><br>
<select id='filter'>
<option value=0>Show all zones</option>
<option value=5000>Show zones > 5K</option>
<option value=1e4>Show zones > 10K</option>
<option value=1e5>Show zones > 100K</option>
<option value=1e6>Show zones > 1M</option>
<option value=1e7>Show zones > 10M</option>
<option value=1e8>Show zones > 100M</option>
<option value=contested>Show contested zones</option>
<option value=colocated>Show colocated zones</option>
<option value=capnull>Show captured = NULL zones</option>
<option value=MAZ100>Show zones that show up in the MAZ >= 100 times</option>
<option value=MAZ10>Show zones that show up in the MAZ >= 10 times</option>
<option value=MAZ1>Show zones that show up in the MAZ >= 1 time</option>
<option value=delta_1e5>Show zones with a change > 100K</option>
<option value=delta_1e6>Show zones with a change > 1M</option>
</select><br>
Player MAZ filter: <input id="filterplayer" type="text" placeholder="player name"/><br>
<a id='statsButton' class='link' onclick='statsToggle()'>Show/hide stats</a><div id='stats' style='display:none'></div>
<div id="zones_shown">0 zones shown</div>
Tactical Range Planner: ${formations_HTML}<br>
<a href='https://github.com/neon-ninja/QONQR'>GitHub</a>`;
L.DomEvent.disableClickPropagation(div);
return div;
};
legend.addTo(map);
window.countfilter = 0;
window.timefilter = "1 day";
var urlParams = new URLSearchParams(window.location.search);
if (urlParams.get("filter")) {
window.countfilter = urlParams.get("filter");
$("#filter").val(window.countfilter);
}
if (urlParams.get("timefilter")) {
window.timefilter = urlParams.get("timefilter");
$("#filtertime").val(window.timefilter);
}
if (urlParams.get("playerfilter")) {
window.playerfilter = urlParams.get("playerfilter");
$("#filterplayer").val(window.playerfilter);
}
if (urlParams.get("teamfilter")) {
layers = urlParams.get("teamfilter").split(",")
window.teamfilter = layers.map(e => Object.keys(overlays).indexOf(e));
for (var l of Object.keys(overlays)) {
if (layers.includes(l)) {
overlays[l].addTo(map);
} else {
overlays[l].removeFrom(map);
}
}
console.log(window.teamfilter)
}
function updateURL() {
urlParams.set("filter", window.countfilter);
urlParams.set("timefilter", window.timefilter);
urlParams.set("teamfilter", layers);
if (window.playerfilter) {
urlParams.set("playerfilter", window.playerfilter)
}
var newRelativePathQuery = window.location.pathname + '?' + urlParams.toString();
history.pushState(null, '', newRelativePathQuery);
}
$("#filter").change(function () {
window.countfilter = this.value;
window.data = {}
query();
updateURL();
})
$("#filtertime").change(function () {
window.timefilter = this.value;
window.data = {}
query();
updateURL();
})
$("#filterplayer").change(function() {
window.playerfilter = this.value;
window.data = {}
query();
updateURL();
})
</script>
</body>
</html>