-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
219 lines (198 loc) · 17.1 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
<!doctype html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-165064611-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-165064611-1');
</script>
<!-- favico definition -->
<link rel="icon" type="image/ico" href="favicon.ico">
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Create checklist for your white bags in RotMG. Here you can track your whitebags, orangebags, or rare items in the game Realm of the Mad God.">
<!-- My script and CSS -->
<script src="minified.js?4"></script>
<link rel="stylesheet" href="styles.css?6">
<!-- JQuery -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<!-- Bootstrap CSS and JS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<title>RotMG Checklist</title>
</head>
<body style="background-color: #243b53;">
<!-- Navbar with title and misc -->
<nav class="navbar" style="background-color: #102a43
; border-bottom: 1px solid #334e68;">
<div>
<h2 class="mt-1 mb-0"><a class="m-0 p-0" style="text-decoration: none;color: #D9E2EC;" href="index.html"><img style="width:48px; height:43.54px;" src="resources/checkedWhitebag.png">  Rotmg Checklist</a></h2>
</div>
<div class="row">
<h5 id="completionRate" class="my-auto mr-4" style="color: #BCCCDC;">
0/300 (0.00%)
</h5>
<!-- Those 3 filters are kind of different from the rest, they aplly in a different way due to business logic -->
<label class="my-btn p-0 my-auto mr-3" style="background-color: #BCCCDC;min-width: 81px;height: 35px;"><input id="gotFilter" class="itemFilter" onClick="clickOnHideGot(this)" type="checkbox"><h5 id="hideGotText" class="mb-0 align-middle" style="color: #102a43;">All</h5></label>
<label class="my-btn p-0 my-1 mr-1"><input id="whitebagFilter" class="itemFilter" onClick="clickFilter('whitebagFilter')" type="checkbox" checked><img class="bagFilter" loading="eager" src="resources/whitebag.png"></label>
<label class="my-btn p-0 my-1 mr-5"><input id="orangebagFilter" class="itemFilter" onClick="clickFilter('orangebagFilter')" type="checkbox" checked><img class="bagFilter" loading="eager" src="resources/orangebag.png"></label>
<form class="form-inline" onsubmit="event.preventDefault();">
<input class="form-control mr-sm-2" style="background-color: #BCCCDC;" type="search" placeholder="Search for item..." id="searchBar" onkeyup="searchItem()" aria-label="Search">
<button class="btn btn-outline-light my-2 my-sm-0 shadow rounded" type="submit">Search</button>
</form>
<!-- Dropdown menu at the top right-->
<button class="btn btn-secondary dropdown ml-4 mr-3 my-auto shadow rounded" style="background-color: #486581;" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="resources/optionsIcon.svg" style="width:20px"/>
</button>
<div class="dropdown-menu dropdown-menu-right mr-3 shadow mt-0 mb-5 py-0 bg-white rounded" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item py-2" style="cursor:pointer;" onClick="exportData()">Export data</a>
<div class="dropdown-divider my-0"></div>
<label for="myfile" class="dropdown-item py-2 my-0" onclick="$('myfile').click();" style="cursor: pointer;">Import data</label>
<input class="dropdown-item" onchange="importData(this)" style="display: none;" type="file" id="myfile" name="myfile"/>
<div class="dropdown-divider my-0"></div>
<a class="dropdown-item py-2" style="cursor:pointer;" onClick="clearData()">Clear all data</a>
<div class="dropdown-divider my-0"></div>
<a class="dropdown-item py-2" href="contact.html">Report a Bug</a>
<div class="dropdown-divider my-0"></div>
<a class="dropdown-item py-2" href="contact.html">Suggestions</a>
<div class="dropdown-divider my-0"></div>
<a class="dropdown-item py-2" href="support.html">Support me</a>
</div>
</div>
</nav>
<!-- Row containing all filters -->
<div class="row mt-3 row-cols-* justify-content-md-center m-0 p-0">
<!-- The first checkbox of each group contains a .gif and is a shortcut for clicking all in their group -->
<!-- When the page loads they are activated, but they will all deactivate when the user does the first click -->
<label class="my-btn p-0 m"><input id="weaponFilter" class="itemFilter" onClick="clickFilter('weaponFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/weapon.gif"></label>
<label class="my-btn p-0"><input id="daggerFilter" class="itemFilter" onClick="clickFilter('daggerFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/dagger.png"></label>
<label class="my-btn p-0"><input id="swordFilter" class="itemFilter" onClick="clickFilter('swordFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/sword.png"></label>
<label class="my-btn p-0"><input id="bowFilter" class="itemFilter" onClick="clickFilter('bowFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/bow.png"></label>
<label class="my-btn p-0"><input id="staffFilter" class="itemFilter" onClick="clickFilter('staffFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/staff.png"></label>
<label class="my-btn p-0"><input id="wandFilter" class="itemFilter" onClick="clickFilter('wandFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/wand.png"></label>
<label class="my-btn p-0 mr-3"><input id="katanaFilter" class="itemFilter" onClick="clickFilter('katanaFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/katana.png"></label>
<label class="my-btn p-0"><input id="abilityFilter" class="itemFilter" onClick="clickFilter('abilityFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/ability.gif"></label>
<label class="my-btn p-0"><input id="cloakFilter" class="itemFilter" onClick="clickFilter('cloakFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/cloak.png"></label>
<label class="my-btn p-0"><input id="poisonFilter" class="itemFilter" onClick="clickFilter('poisonFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/poison.png"></label>
<label class="my-btn p-0"><input id="prismFilter" class="itemFilter" onClick="clickFilter('prismFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/prism.png"></label>
<label class="my-btn p-0"><input id="quiverFilter" class="itemFilter" onClick="clickFilter('quiverFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/quiver.png"></label>
<label class="my-btn p-0"><input id="trapFilter" class="itemFilter" onClick="clickFilter('trapFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/trap.png"></label>
<label class="my-btn p-0"><input id="starFilter" class="itemFilter" onClick="clickFilter('starFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/star.png"></label>
<label class="my-btn p-0"><input id="spellFilter" class="itemFilter" onClick="clickFilter('spellFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/spell.png"></label>
<label class="my-btn p-0"><input id="skullFilter" class="itemFilter" onClick="clickFilter('skullFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/skull.png"></label>
<label class="my-btn p-0"><input id="orbFilter" class="itemFilter" onClick="clickFilter('orbFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/orb.png"></label>
<label class="my-btn p-0"><input id="tomeFilter" class="itemFilter" onClick="clickFilter('tomeFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/tome.png"></label>
<label class="my-btn p-0"><input id="scepterFilter" class="itemFilter" onClick="clickFilter('scepterFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/scepter.png"></label>
<label class="my-btn p-0"><input id="helmFilter" class="itemFilter" onClick="clickFilter('helmFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/helm.png"></label>
<label class="my-btn p-0"><input id="shieldFilter" class="itemFilter" onClick="clickFilter('shieldFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/shield.png"></label>
<label class="my-btn p-0"><input id="sealFilter" class="itemFilter" onClick="clickFilter('sealFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/seal.png"></label>
<label class="my-btn p-0"><input id="wakizashiFilter" class="itemFilter" onClick="clickFilter('wakizashiFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/wakizashi.png"></label>
<label class="my-btn p-0 mr-3"><input id="luteFilter" class="itemFilter" onClick="clickFilter('luteFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/lute.png"></label>
<label class="my-btn p-0"><input id="armorFilter" class="itemFilter" onClick="clickFilter('armorFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/armor.gif"></label>
<label class="my-btn p-0"><input id="leatherarmorFilter" class="itemFilter" onClick="clickFilter('leatherarmorFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/leatherarmor.png"></label>
<label class="my-btn p-0"><input id="robeFilter" class="itemFilter" onClick="clickFilter('robeFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/robe.png"></label>
<label class="my-btn p-0 mr-3"><input id="heavyarmorFilter" class="itemFilter" onClick="clickFilter('heavyarmorFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/heavyarmor.png"></label>
<!-- Ring is the exception because there are not subtypes of rings -->
<label class="my-btn p-0"><input id="ringFilter" class="itemFilter" onClick="clickFilter('ringFilter')" type="checkbox" unchecked><img class="filterImg" loading="eager" src="resources/ring.png"></label> </div>
<!-- This is the grid which will hold all the items, will get filled by javascript (so the http response is lighter) -->
<div class="row justify-content-start mt-3 row-cols-*" style="margin-right: 0px;margin-left: 0px;" id="itemGrid">
<script>
// After we create the grid, we create a div for each item we know
fillItemGrid();
// Now we load the count of each item from localStorage
loadItemCount();
// We create the item drop sound to play when clicking on bags
for(i = 0; i < 4; i++) {
dropSound[i] = new sound("resources/dropSound.ogg");
}
// We set up a modal to show mini-screenshots of an item as soon as it gets clicked
$(function(){
$('#exampleModalCenter').on('show.bs.modal', function (event) {
currentItemID = $(event.relatedTarget).data('itemid');
// This function will fill the modal with the photos
displayScreenshots(currentItemID);
});
});
</script>
<!-- Modal to show mini-screenshots of a specific item (will change the content each time it gets invoked, depending on the caller item) -->
<div class="modal fade pr-0" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterTitle">Screenshots</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="row row-cols-md-3" id="screenshotList">
</div>
</div>
</div>
</div>
</div>
<!-- We set a modal to show the full size photo of a mini-photo when it's clicked -->
<script>
$(function(){
$('#realSizeImageModal').on('show.bs.modal', function (event) {
document.getElementById('realSizeScreenshot').src = $(event.relatedTarget).data('imageurl');
});
});
</script>
<!-- Modal to show the full size screenshots of a specific item (will change the content each time it gets invoked, depending on the miniphoto clicked) -->
<div class="modal fade" id="realSizeImageModal" style="text-align: center;" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog mx-auto mb-0" style="max-width: 100%;width: auto;display: inline-block;" role="document">
<div class="modal-content mx-auto">
<div class="modal-body mx-auto p-0">
<img style="max-width:100%;" id="realSizeScreenshot" src="resources/whitebag.png" onClick="closeModal('#realSizeImageModal')" alt="Error loading image, check url for disponibility.">
</div>
</div>
</div>
</div>
<!-- Modal with the input to add a new screenshot (via URL) for an item * This one gets called from the photo/button inside the "exampleModalCenter" modal,
that photo/button gets created by javascript dinamically* -->
<div class="modal fade" id="addScreenshotModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterTitle">Add new Screenshot</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form onsubmit="return addScreenshot('#addScreenshotModal')">
<div class="form-group">
<label for="Copy the photo url here:">Copy the URL to the image:</label>
<input type="url" class="form-control" id="addUrl" aria-describedby="urlHelp">
<small id="urlHelp" class="form-text text-muted">Must be a direct link to the photo, the one with file extension.</small>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal to confirm the delete of a screenshot. This one gets created from right-clicking the miniature of the screenshot the user wants to delete -->
<div class="modal fade" id="confirmScreenshotDeleteModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterTitle">Are you sure you want to remove the screenshot?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<button type="button" class="btn btn-primary btn-lg" onClick="deleteScreenshot('true')">Delete</button>
<button type="button" class="btn btn-secondary btn-lg" onClick="deleteScreenshot('false')">Cancel</button>
</div>
</div>
</div>
</div>
</body>
</html>