forked from antialiasis/favorite-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
527 lines (457 loc) · 21.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0">
<title>Fire Emblem Three Houses Favorite Picker</title>
<style>
body {
background:#FFF;
color:#000;
font-family:verdana, sans-serif;
font-size:10pt;
margin:0;
padding:10px;
}
a:link, a:visited {
color:#008;
font-weight:bold;
text-decoration:none;
}
a:active, a:hover {
color:#ACF;
}
.info {
font-weight:bold;
}
button {
font-family:inherit;
cursor:pointer;
border:0;
border-radius:3px;
padding:0.3em 0.5em;
background:#CCC;
color:#000;
}
button:hover {
background:#DDD;
}
button.disabled {
background:#DDD;
color:#888;
cursor:not-allowed;
}
button.disabled:hover {
background:#DDD;
}
#container {
position:relative;
margin-left:-10px;
margin-right:-10px;
padding:10px;
overflow:hidden;
}
@media (min-width:1024px) {
/* Put the found favorites beside the picking div when the window is sufficiently large */
#picking {
float:left;
width:636px;
}
#secondary {
margin-left:646px;
}
}
@media (min-width:1300px) {
/* Once we get to the point where 636px is less than half of the width of the screen, make the picking div just take up half */
#picking {
width:50%;
}
#secondary {
margin-left:51%;
}
}
#pick {
background:#58F;
color:#FFF;
font-size:larger;
font-weight:bold;
width:6em;
border-radius:5px;
margin-right:10px;
}
#pick.disabled {
background:#ACF;
}
#pick:hover {
background:#ACF;
}
.item-list {
padding:0;
list-style-type:none;
line-height:100px;
}
.item-list li {
margin:0;
display:inline-block;
height:100px;
width:100px;
line-height:100px;
border:3px solid transparent;
text-align:center;
position:relative;
vertical-align:top;
overflow:hidden;
border-radius:53px;
background:#F7F7F7;
color:#000;
}
.item-list li img {
vertical-align:middle;
max-height:100%;
max-width:100%;
}
.item-list li span {
display:inline-block;
vertical-align:middle;
line-height:1.2;
}
@media (max-width:636px) {
.item-list {
line-height:75px;
}
.item-list li {
line-height:75px;
height:75px;
width:75px;
}
}
@media (max-width:423px) {
.item-list {
line-height:50px;
}
.item-list li {
line-height:50px;
height:50px;
width:50px;
}
}
#evaluating li {
cursor:pointer;
}
#favorites li {
cursor:move;
}
.item-list li:hover {
background:#CDF;
}
.item-list.sorting li:hover {
background:#F7F7F7;
}
#evaluating li.selected {
border:3px solid #7AC;
}
#evaluating, #buttons {
text-align:center;
margin:auto;
}
#evaluating li.notice {
width:auto;
height:auto;
max-width:260px;
margin:auto;
background:#F7F7F7;
border-radius:10px;
padding:30px 30px;
color:#000;
text-align:center;
line-height:1.4;
cursor:auto;
font-size:10pt;
}
#buttons {
margin-top:30px;
position:relative;
z-index:3;
}
#shared-list-modal {
position:absolute;
background:#FFF;
margin:60px auto;
top:0;
right:0;
left:0;
width:650px;
max-width:95%;
box-sizing:border-box;
padding:20px 50px 50px;
box-shadow:1px 1px 5px #333;
z-index:100;
}
@media(max-width:700px) {
#shared-list-modal {
padding:20px;
}
}
#shared-list-modal:before {
content:'';
position:fixed;
background:#FFF;
opacity:0.5;
top:0;
right:0;
bottom:0;
left:0;
z-index:-1;
}
#shared-list-modal .item-list {
text-align:center;
margin:2em 0;
}
#shared-list-modal .close {
position:absolute;
top:10px;
right:10px;
width:30px;
line-height:30px;
color:#AAA;
font-weight:bold;
text-align:center;
background:none;
padding:0;
font-size:larger;
}
#shared-list-modal .close:hover {
background:#EEE;
}
#shared-list-modal .buttons {
text-align:center;
line-height:3.5em;
}
#shared-list-modal button {
padding:0.9em 2em;
margin:0 0.2em;
}
#spoilers {
display:none;
}
</style>
</head>
<body>
<h1>Fire Emblem Three Houses Favorite Picker</h1>
<p>Derived from<a href="https://github.com/antialiasis/favorite-picker"> antialiasis/favortie-picker.</a> Graphics courtesy of <a href="https://fireemblem.fandom.com"> fireemblem.fandom.com</a></p>
<div id="container">
<div id="picking">
<ul id="evaluating" class="item-list">
</ul>
<p id="buttons"><button id="pick">Pick</button> <button id="pass">Pass</button> <button id="undo">Undo</button> <button id="redo">Redo</button></p>
<button onclick="hideSpoilers()">Show/Hide Spoiler Categories</button>
</div>
<div id="secondary">
<h2>Found favorites</h2>
<ol id="favorites" class="item-list">
</ol>
<p><a href="" id="shortcode-link">Permalink to this list</a></p>
<p><button class="reset">Reset</button></p>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="picker.js"></script>
<script src="picker-ui.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/Sortable.min.js"></script>
<div id="shared-list-modal" style="display:none">
<button class="close shared-list-skip">×</button>
<h2>Shared list</h2>
<p>Generated by this picker tool. Create your own list or continue from this one below!</p>
<ol id="shared-list" class="item-list">
</ol>
<p class="buttons"><button id="shared-list-continue">Continue from this list</button> <button class="shared-list-skip">Make my own list</button></p>
</div>
<p>Include Factions:
<label><input type="checkbox" name="factions" class="factions" value="church"> Church of Seiros</label>
<label><input type="checkbox" name="factions" class="factions" value="kingdom"> Holy Kingdom of Faerghus</label>
<label><input type="checkbox" name="factions" class="factions" value="alliance"> Leicester Alliance</label>
<label><input type="checkbox" name="factions" class="factions" value="empire"> Adrestian Empire</label>
<label><input type="checkbox" name="factions" class="factions" value="bandit"> Bandits</label>
</p>
<p id="spoilers">Other Factions
<label><input type="checkbox" name="factions" class="factions" value="agartha"> Agartha</label>
<label><input type="checkbox" name="factions" class="factions" value="almyra"> Other</label>
<label><input type="checkbox" name="factions" class="factions" value="flame"> Flame Emperor</label>
<label><input type="checkbox" name="factions" class="factions" value="nemesis"> Nemesis</label>
<label><input type="checkbox" name="factions" class="factions" value="neutral"> Neutral/Other</label>
</p>
<p>Students?:
<label><input type="checkbox" name="students" class="students" value="yes"> Yes</label>
<label><input type="checkbox" name="students" class="students" value="no"> No</label>
</p>
<p>Playable?:
<label><input type="checkbox" name="playables" class="playables" value="yes"> Yes</label>
<label><input type="checkbox" name="playables" class="playables" value="no"> No</label>
</p>
<p><label>Duplicates? <input type="checkbox" id="duplicates"></label></p>
<script>
'use strict';
var items = [
{id: 'alois', name: 'Alois', image: 'graphics/Alois_Portrait.png', faction: "church", playable: "yes", student: "no", base: "alois", shortcode:"fd"},
{id: 'annette', name: 'Annette', image: 'graphics/Annette_Portrait.png', faction: "kingdom", playable: "yes", student: "yes", base: "annette", shortcode:"ql"},
{id: 'bylethf', name: 'Byleth - Female', image: 'graphics/Byleth_F_Portrait.jpg', faction: "malleable", playable: "yes", student: "no", base: "byleth", shortcode:"tr"},
{id: 'bylethm', name: 'Byleth - Male', image: 'graphics/Byleth_M_Portrait.jpg', faction: "malleable", playable: "yes", student: "no", base: "byleth", shortcode:"qo"},
{id: 'claude', name: 'Claude', image: 'graphics/Claude_Portrait.png', faction: "alliance", playable: "yes", student: "yes", base: "claude", shortcode:"jn"},
{id: 'dimitri', name: 'Dimitri', image: 'graphics/Dimitri_Portrait.png', faction: "kingdom", playable: "yes", student: "yes", base: "dimitri", shortcode:"zf"},
{id: 'edelgard', name: 'Edelgard', image: 'graphics/Edelgard_Portrait.png', faction: "empire", playable: "yes", student: "yes", base: "edelgard", shortcode:"kr"},
{id: 'ashe', name: 'Ashe', image: 'graphics/Ashe_Portrait.png', faction: "kingdom", playable: "yes", student: "yes", base: "ashe", shortcode:"lb"},
{id: 'bernadetta', name: 'Bernadetta', image: 'graphics/Bernadetta_Portrait.png', faction: "empire", playable: "yes", student: "yes", base: "bernadetta", shortcode:"vr"},
{id: 'caspar', name: 'Caspar', image: 'graphics/Caspar_Portrait.png', faction: "empire", playable: "yes", student: "yes", base: "caspar", shortcode:"fy"},
{id: 'catherine', name: 'Catherine', image: 'graphics/Catherine_Portrait.png', faction: "church", playable: "yes", student: "no", base: "catherine", shortcode:"gn"},
{id: 'cyril', name: 'Cyril', image: 'graphics/Cyril_Portrait.png', faction: "church", playable: "yes", student: "no", base: "cyril", shortcode:"ir"},
{id: 'dorothea', name: 'Dorothea', image: 'graphics/Dorothea_Portrait.png', faction: "empire", playable: "yes", student: "yes", base: "dorothea", shortcode:"in"},
{id: 'dedue', name: 'Dedue', image: 'graphics/Doudou_Portrait.png', faction: "kingdom", playable: "yes", student: "yes", base: "dedue", shortcode:"mi"},
{id: 'felix', name: 'Felix', image: 'graphics/Felix_Portrait.png', faction: "kingdom", playable: "yes", student: "yes", base: "felix", shortcode:"fj"},
{id: 'ferdinand', name: 'Ferdinand', image: 'graphics/Ferdinand_Portrait.png', faction: "empire", playable: "yes", student: "yes", base: "ferdinand", shortcode:"ru"},
{id: 'flayn', name: 'Flayn', image: 'graphics/Flayn_Portrait.png', faction: "church", playable: "yes", student: "yes", base: "flayn", shortcode:"gs"},
{id: 'gilbert', name: 'Gilbert', image: 'graphics/Gilbert_Portrait.png', faction: "kingdom", playable: "yes", student: "no", base: "gilbert", shortcode:"bn"},
{id: 'hanneman', name: 'Hanneman', image: 'graphics/Hanneman_Portrait.png', faction: "church", playable: "yes", student: "no", base: "hanneman", shortcode:"xl"},
{id: 'hilda', name: 'Hilda', image: 'graphics/Hilda_Portrait.png', faction: "alliance", playable: "yes", student: "yes", base: "hilda", shortcode:"ry"},
{id: 'hubert', name: 'Hubert', image: 'graphics/Hubert_Portrait.png', faction: "empire", playable: "yes", student: "yes", base: "hubert", shortcode:"cr"},
{id: 'ignatz', name: 'Ignatz', image: 'graphics/Ignace_Portrait.png', faction: "alliance", playable: "yes", student: "yes", base: "ignatz", shortcode:"ky"},
{id: 'ingrid', name: 'Ingrid', image: 'graphics/Ingrid_Portrait.png', faction: "kingdom", playable: "yes", student: "yes", base: "ingrid", shortcode:"ly"},
{id: 'leonie', name: 'Leonie', image: 'graphics/Leonie_Portrait.png', faction: "alliance", playable: "yes", student: "yes", base: "leonie", shortcode:"zo"},
{id: 'linhardt', name: 'Linhardt', image: 'graphics/Linhardt_Portrait.png', faction: "empire", playable: "yes", student: "yes", base: "linhardt", shortcode:"zq"},
{id: 'lorenz', name: 'Lorenz', image: 'graphics/Lorentz_Portrait.png', faction: "alliance", playable: "yes", student: "yes", base: "lorenz", shortcode:"io"},
{id: 'lysithea', name: 'Lysithea', image: 'graphics/Lysithea_Portrait.png', faction: "alliance", playable: "yes", student: "yes", base: "lysithea", shortcode:"bd"},
{id: 'manuela', name: 'Manuela', image: 'graphics/Manuela_Portrait.png', faction: "church", playable: "yes", student: "no", base: "manuela", shortcode:"it"},
{id: 'marianne', name: 'Marianne', image: 'graphics/Marianne_Portrait.png', faction: "alliance", playable: "yes", student: "yes", base: "marianne", shortcode:"lr"},
{id: 'mercedes', name: 'Mercedes', image: 'graphics/Mercedes_Portrait.jpg', faction: "kingdom", playable: "yes", student: "yes", base: "mercedes", shortcode:"am"},
{id: 'petra', name: 'Petra', image: 'graphics/Petra_Portrait.png', faction: "empire", playable: "yes", student: "yes", base: "petra", shortcode:"re"},
{id: 'raphael', name: 'Raphael', image: 'graphics/Raphael_Portrait.png', faction: "alliance", playable: "yes", student: "yes", base: "raphael", shortcode:"rf"},
{id: 'seteth', name: 'Seteth', image: 'graphics/Seteth_Portrait.png', faction: "church", playable: "yes", student: "no", base: "seteth", shortcode:"az"},
{id: 'shamir', name: 'Shamir', image: 'graphics/Shamir_Portrait.png', faction: "church", playable: "yes", student: "no", base: "shamir", shortcode:"to"},
{id: 'slyvain', name: 'Sylvain', image: 'graphics/Sylvain_Portrait.png', faction: "kingdom", playable: "yes", student: "yes", base: "slyvain", shortcode:"vm"},
//non playable below
{id: 'anna', name: 'Anna', image: 'graphics/misc/Anna_3_Houses_portrait.png', faction: "neutral", playable: "yes", student: "no", base: "anna", shortcode:"wy"},
{id: 'aegir', name: 'Duke Aegir', image: 'graphics/misc/Duke_Aegir_portrait.png', faction: "empire", playable: "no", student: "no", base: "aegir", shortcode:"yj"},
{id: 'fleche', name: 'Fleche', image: 'graphics/misc/Fleche_portrait.png', faction: "empire", playable: "no", student: "no", base: "fleche", shortcode:"ig"},
{id: 'ionius', name: 'Ionius IX', image: 'graphics/misc/Ionius_IX_portrait.png', faction: "empire", playable: "no", student: "no", base: "ionius", shortcode:"ho"},
{id: 'jeralt', name: 'Jeralt', image: 'graphics/misc/Jeralt_portrait.png', faction: "neutral", playable: "no", student: "no", base: "jeralt", shortcode:"cq"},
{id: 'jeritza', name: 'Jeritza', image: 'graphics/misc/Jeritza_Portrait.png', faction: "church", playable: "yes", student: "no", base: "emile", shortcode:"cn"},
{id: 'judith', name: 'Judith', image: 'graphics/misc/Judith_portrait.png', faction: "alliance", playable: "no", student: "no", base: "judith", shortcode:"za"},
{id: 'lambert', name: 'Lambert', image: 'graphics/misc/Lambert_portrait.png', faction: "kingdom", playable: "no", student: "no", base: "lambert", shortcode:"ks"},
{id: 'monica', name: 'Monica', image: 'graphics/misc/Monica_FE16_Portrait.png', faction: "empire", playable: "no", student: "yes", base: "kronya", shortcode:"va"},
{id: 'rhea', name: 'Rhea', image: 'graphics/misc/Rhea_Portrait.png', faction: "church", playable: "no", student: "no", base: "rhea", shortcode:"gi"},
{id: 'rodrigue', name: 'Rodrigue', image: 'graphics/misc/Rodrigue_Portrait.png', faction: "kingdom", playable: "no", student: "no", base: "rodrigue", shortcode:"us"},
{id: 'sothis', name: 'Sothis', image: 'graphics/misc/Sothis_portrait.png', faction: "neutral", playable: "no", student: "no", base: "sothis", shortcode:"em"},
{id: 'tomas', name: 'Tomas', image: 'graphics/misc/Tomas_Portrait.png', faction: "church", playable: "no", student: "no", base: "solon", shortcode:"ge"},
//antagonists below
{id: 'acheron', name: 'Acheron', image: 'graphics/antagonists/Acheron_portrait.png', faction: "alliance", playable: "no", student: "no", base: "acheron", shortcode:"wp"},
{id: 'cornelia', name: 'Cornelia', image: 'graphics/antagonists/Cornelia_portrait.png', faction: "kingdom", playable: "no", student: "no", base: "cornelia", shortcode:"dn"},
{id: 'flame_emperor', name: 'Flame Emperor', image: 'graphics/antagonists/Flame_Emperor_Portrait.png', faction: "flame", playable: "no", student: "no", base: "edelgard", shortcode:"ga"},
{id: 'gwendal', name: 'Gwendal', image: 'graphics/antagonists/Gwendal_portrait.png', faction: "empire", playable: "no", student: "no", base: "gwendal", shortcode:"lv"},
{id: 'kostas', name: 'Kostas', image: 'graphics/antagonists/Kostas_Portrait.png', faction: "bandit", playable: "no", student: "no", base: "kostas", shortcode:"lw"},
{id: 'kronya', name: 'Kronya', image: 'graphics/antagonists/Kronya_Heroes.png', faction: "agartha", playable: "no", student: "no", base: "kronya", shortcode:"ud"},
{id: 'ladislava', name: 'Ladislava', image: 'graphics/antagonists/Ladislava_portrait.png', faction: "empire", playable: "no", student: "no", base: "ladislava", shortcode:"id"},
{id: 'lonato', name: 'Lonato', image: 'graphics/antagonists/Lonato_Portrait.png', faction: "kingdom", playable: "no", student: "no", base: "lonato", shortcode:"ee"},
{id: 'metodey', name: 'Metodey', image: 'graphics/antagonists/Metodey_portrait.png', faction: "empire", playable: "no", student: "no", base: "metodey", shortcode:"kd"},
{id: 'miklan', name: 'Miklan', image: 'graphics/antagonists/Miklan_portrait.png', faction: "bandit", playable: "no", student: "no", base: "miklan", shortcode:"ui"},
{id: 'nader', name: 'Nader', image: 'graphics/antagonists/Nader_portrait.png', faction: "almyra", playable: "no", student: "no", base: "nader", shortcode:"ml"},
{id: 'nemesis', name: 'Nemesis', image: 'graphics/antagonists/Nemesis_portrait.png', faction: "nemesis", playable: "no", student: "no", base: "nemesis", shortcode:"es"},
{id: 'pallardo', name: 'Pallardó', image: 'graphics/antagonists/Pallard_portrait.png', faction: "bandit", playable: "no", student: "no", base: "pallardo", shortcode:"po"},
{id: 'randolph', name: 'Randolph', image: 'graphics/antagonists/Randolph_portrait.png', faction: "empire", playable: "no", student: "no", base: "randolph", shortcode:"ve"},
{id: 'death_knight', name: 'Death Knight', image: 'graphics/antagonists/Reaper_Knight_Portrait.png', faction: "flame", playable: "no", student: "no", base: "emile", shortcode:"zm"},
{id: 'seiros', name: 'Seiros', image: 'graphics/antagonists/Seiros_portrait.png', faction: "church", playable: "no", student: "no", base: "seiros", shortcode:"gj"},
{id: 'solon', name: 'Solon', image: 'graphics/antagonists/Solon_Portrait.png', faction: "agartha", playable: "no", student: "no", base: "solon", shortcode:"xi"},
{id: 'thales', name: 'Thales', image: 'graphics/antagonists/Thales_Portrait.png', faction: "agartha", playable: "no", student: "no", base: "thales", shortcode:"af"},
{id: 'volkhard', name: 'Volkhard', image: 'graphics/antagonists/Volkhard_portrait.png', faction: "empire", playable: "no", student: "no", base: "thales", shortcode:"pn"}
];
var myPicker = new picker.Picker({
items: items,
localStorageKey: 'fire-emblem-picker-state',
favoritesQueryParam: 'favs',
shortcodeLength: 2,
defaultSettings: {
factions: ['kingdom', 'alliance', 'empire'],
students: ['yes'],
playables: ['yes'],
duplicates: false
},
shouldIncludeItem: function(item, settings) {
// Include only if:
// 1. the character's role is in the list of roles we've checked, and
// 2. we haven't checked the "recurring only" box, or the character is a recurring character.
return settings.factions.indexOf(item.faction) !== -1 &&
settings.students.indexOf(item.student) !== -1 &&
settings.playables.indexOf(item.playable) !== -1;
},
getFilteredItems: function(settings) {
var used = {};
var filteredList = [];
for (var i = 0; i < items.length; i++) {
// Skip item if:
// 1. the character's role is not in the list of roles we've checked, or
// 2. we checked the "recurring only" box, and the character is not a recurring character.
if (settings.factions.indexOf(items[i].faction) == -1 ||
settings.students.indexOf(items[i].student) == -1 ||
settings.playables.indexOf(items[i].playable) == -1) continue;
// If we want no duplicates, make sure we're not already including a different incarnation of the same character.
if (!settings.duplicates) {
// Skip if we're already including a character with this base.
if (items[i].base && used[items[i].base]) continue;
// Record that we're including this character, so we don't introduce duplicates later.
used[items[i].base || items[i].id] = true;
}
filteredList.push(items[i].id);
}
return filteredList;
}
});
var pickerUI = new PickerUI(myPicker, {
elements: {
pick: "#pick",
pass: "#pass",
undo: "#undo",
redo: "#redo",
reset: ".reset",
evaluating: "#evaluating",
favorites: "#favorites",
shortcodeLink: "#shortcode-link",
sharedListContainer: "#shared-list-modal",
sharedList: "#shared-list",
sharedListContinue: "#shared-list-continue",
sharedListSkip: ".shared-list-skip",
settings: {
factions: '.factions',
students: '.students',
playables: '.playables',
duplicates: '#duplicates'
}
}
});
pickerUI.initialize();
/* Sortable favorites - you can safely remove this, and the Sortable.min.js script, if you don't want to be able to sort your favorite list. */
var sortable = new Sortable(pickerUI.elem.favorites.get(0), {
draggable: '.item',
animation: 100,
onStart: function() {
pickerUI.elem.favorites.addClass("sorting");
},
onEnd: function() {
pickerUI.elem.favorites.removeClass("sorting");
},
onUpdate: function() {
myPicker.setFavorites(pickerUI.elem.favorites.children().map(function() {
return pickerUI.getItem(this);
}).get());
pickerUI.update(true);
}
});
/* End sortable favorites */
/*hidden categories*/
function hideSpoilers() {
var x = document.getElementById("spoilers");
if (x.style.display === "block") {
x.style.display = "none";
} else {
x.style.display = "block";
}
}
</script>
</body>
</html>