-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfilters.js
More file actions
36 lines (33 loc) · 823 Bytes
/
Copy pathfilters.js
File metadata and controls
36 lines (33 loc) · 823 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
30
31
32
33
34
35
36
let defaultStats = {
'Rounds Played': 0,
'Rounds Won': 0,
'Win %': 0,
'Current Streak': 0,
'Maximum Streak': 0,
'Total Time': 0,
'Average Time': 0
}
let existingPlayerStatsImport = localStorage.getItem('playerStats');
var existingPlayerStats = existingPlayerStatsImport ? JSON.parse(existingPlayerStatsImport) : defaultStats;
var mapFilterMode;
var rankFilterMode;
// Map Filters
function mapFilter(input) {
if(input == 'all') {
mapFilterMode = 0;
} else if(input == 'sp') {
mapFilterMode = 1;
} else {
mapFilterMode = 2;
}
existingPlayerStats['Current Streak'] = 0;
streak = 0;
reset();
}
// Rank Filters
function rankFilter(input) {
rankFilterMode = input;
existingPlayerStats['Current Streak'] = 0;
streak = 0;
reset();
}