generic-skin 2.3.1 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  const FNR = {
2
- execFn: function(callback) {
2
+ execFn: (callback) => {
3
3
  document.addEventListener('forumReady', callback, false);
4
4
  },
5
5
  forum: {
6
- getColors: function() {
6
+ getColors: () => {
7
7
  return Object.values(forumColours)
8
8
  .map((item) => {
9
9
  return {
@@ -12,7 +12,7 @@ const FNR = {
12
12
  }
13
13
  });
14
14
  },
15
- getLatest: function(filterArray, limit) {
15
+ getTopics: (array, limit) => {
16
16
  return new Promise((resolve, reject) => {
17
17
  const addContent = (elmt) => {
18
18
  const titleElmnt = $(elmt).find('.topictitle');
@@ -38,9 +38,9 @@ const FNR = {
38
38
  };
39
39
 
40
40
  const getPage = (url) => {
41
- $.get(url, function(data) {
41
+ $.get(url, (data) => {
42
42
  $(data).find('.ipbform').find('tbody').find('tr').each(function() {
43
- if (finalArray.length < limit && filterArray.indexOf(parseInt($(this).find('.row2 + .row2:not(.centered) a').attr('href').split('/f')[1].split('-')[0])) === -1) {
43
+ if (finalArray.length < limit && array.indexOf(parseInt($(this).find('.row2 + .row2:not(.centered) a').attr('href').split('/f')[1].split('-')[0])) === -1) {
44
44
  addContent(this);
45
45
  }
46
46
  });
@@ -58,7 +58,7 @@ const FNR = {
58
58
  getPage('/latest?change_version=invision');
59
59
  });
60
60
  },
61
- getMembers: function(option) {
61
+ getMembers: (option) => {
62
62
  return new Promise((resolve, reject) => {
63
63
  let members = [];
64
64
 
@@ -80,7 +80,7 @@ const FNR = {
80
80
  if (option) {
81
81
  users.push(getUserData(this, group));
82
82
  } else {
83
- if (group !== 'unknown' && group !== 'narracion') {
83
+ if (group !== 'unknown' && group !== forumConfig.skinOptions.adminGroup) {
84
84
  users.push(getUserData(this, group));
85
85
  }
86
86
  }
@@ -90,7 +90,7 @@ const FNR = {
90
90
  };
91
91
 
92
92
  const getPage = (url) => {
93
- $.get(url, function(data) {
93
+ $.get(url, (data) => {
94
94
  const nextURL = $(data).find('.pagination img[alt="Siguiente"]').parent().attr('href') || false;
95
95
 
96
96
  members = members.concat(getUsersPage(data));
@@ -107,10 +107,50 @@ const FNR = {
107
107
  });
108
108
  };
109
109
 
110
- getPage('/memberlist?change_version=phpbb2');
110
+ getPage('/memberlist?change_version=invision');
111
111
  });
112
112
  },
113
- getAffiliates: function() {
113
+ getGroups: (cache) => {
114
+ const getData = () => {
115
+ return new Promise((resolve, reject) => {
116
+ $.get('/groups?change_version=invision', (data) => {
117
+ let groups = [];
118
+
119
+ $(data).find('.group_list > li').each(function() {
120
+ groups.push({
121
+ id: parseInt($(this).find('a').attr('href').split('/g')[1].split('-')[0]),
122
+ name: $(this).find('a').text().trim(),
123
+ color: $(this).find('a').css('color'),
124
+ url: Vue.filter('url-to-normal')($(this).find('a').attr('href')),
125
+ count: parseInt($(this).find('div > span').text()) - 1
126
+ });
127
+ });
128
+
129
+ resolve(groups);
130
+ });
131
+ });
132
+ };
133
+
134
+ const readGroupsCache = () => {
135
+ return new Promise((resolve, reject) => {
136
+ FNR.cache.useData('groups', cache).then(
137
+ (result) => {
138
+ resolve(result);
139
+ },
140
+ (err) => {
141
+ getData().then((data) => {
142
+ FNR.cache.setData('groups', data);
143
+
144
+ resolve(data);
145
+ });
146
+ }
147
+ );
148
+ });
149
+ };
150
+
151
+ return readGroupsCache();
152
+ },
153
+ getAffiliates: () => {
114
154
  return new Promise((resolve, reject) => {
115
155
  const tops = forumConfig.affiliatesMax;
116
156
 
@@ -137,101 +177,207 @@ const FNR = {
137
177
  });
138
178
  },
139
179
  },
140
- content: {
141
- post: {
142
- getPost: function(url) {
143
- return new Promise((resolve, reject) => {
144
- $.get(Vue.filter('url-to-invision')(url), (data) => {
145
- const post = $(data).find("#p" + url.split("#")[1]);
146
-
147
- resolve({
148
- author: {
149
- text: post.find(".author a").text(),
150
- color: post.find(".author a span").css("color"),
151
- url: Vue.filter('url-to-normal')(post.find(".author a").attr("href")),
152
- },
153
- content: post.find(".post-entry > div").html(),
154
- date: post.find(".author").html().split("</a>")[1],
155
- });
180
+ content: {
181
+ isAutosave: () => {
182
+ if (document.post === undefined) return false;
183
+ else return _userdata.user_id !== -1 && document.post.mode.value === 'reply' && document.post.t !== undefined
184
+ },
185
+ getPost: (url) => {
186
+ return new Promise((resolve, reject) => {
187
+ $.get(Vue.filter('url-to-invision')(url), (data) => {
188
+ const post = $(data).find("#p" + url.split("#")[1]);
189
+
190
+ resolve({
191
+ author: {
192
+ text: post.find(".author a").text(),
193
+ color: post.find(".author a span").css("color"),
194
+ url: Vue.filter('url-to-normal')(post.find(".author a").attr("href")),
195
+ },
196
+ content: post.find(".post-entry > div").html(),
197
+ date: post.find(".author").html().split("</a>")[1],
156
198
  });
157
199
  });
158
- },
159
- getLast: function(url) {
160
- return new Promise((resolve, reject) => {
161
- $.get(Vue.filter('url-to-invision')(url), (data) => {
162
- const url = $(data).find('.pagination.topic-options').children().last().prev().attr('href') || false;
163
- const self = data;
164
-
165
- const processData = (data) => {
166
- const getLast = (page) => {
167
- return $(page).find('.post').parent().children().last().prev();
168
- };
169
-
170
- const check = getLast(data).find('.author a').text() !== '';
171
-
172
- return {
173
- author: {
174
- text: (check) ? getLast(data).find('.author a').text() : 'Invitado',
175
- color: (check) ? getLast(data).find('.author a span').css('color') : '#bdbdbd',
176
- url: (check) ? getLast(data).find('.author a').attr('href').replace('?change_version=invision', '') : '#'
177
- },
178
- locate: {
179
- text: $(data).find('#navstrip').find('li').last().text(),
180
- url: $(data).find('#navstrip').find('li').last().find('a').attr('href').replace('?change_version=invision', '')
181
- },
182
- url: getLast(data).find('.postbody-head h3 a').attr('href').replace('?change_version=invision', ''),
183
- content: getLast(data).find('.post-entry > div').html(),
184
- date: (check) ? getLast(data).find('.author').html().split('</a>')[1].trim() : getLast(data).find('.author').html().split('Invitado')[1].trim()
185
- };
186
- };
200
+ });
201
+ },
202
+ genPost: (id, content) => {
203
+ return new Promise((resolve, reject) => {
204
+ let save = document.createElement('iframe');
187
205
 
188
- if (url) {
189
- $.get(url, (data) => {
190
- resolve(processData(data));
191
- });
192
- } else {
193
- resolve(processData(self));
194
- }
195
- });
206
+ save.id = 'forum-save';
207
+ save.src = '/post?t=' + id + '&mode=reply&change_version=invision';
208
+ save.width = 0;
209
+ save.height = 0;
210
+ save.onload = () => {
211
+ saveDOM.onload = () => {
212
+ $('#forum-save').remove();
213
+
214
+ console.clear();
215
+
216
+ resolve(true);
217
+ };
218
+
219
+ $('#forum-save').contents().find('.subtitle:contains("Mensaje")').next().find('textarea').val(content);
220
+ $('#forum-save').contents().find('.formbuttonrow.center input[value="Enviar"]').click();
221
+ };
222
+
223
+ document.querySelector('body > header').prepend(save);
224
+
225
+ const saveDOM = document.getElementById('forum-save');
226
+ });
227
+ },
228
+ genTopic: (id, name, content) => {
229
+ return new Promise((resolve, reject) => {
230
+ let save = document.createElement('iframe');
231
+
232
+ save.id = 'forum-save';
233
+ save.src = '/post?f=' + id + '&mode=newtopic&change_version=invision';
234
+ save.width = 0;
235
+ save.height = 0;
236
+ save.onload = () => {
237
+ saveDOM.onload = () => {
238
+ $('#forum-save').remove();
239
+
240
+ console.clear();
241
+
242
+ resolve(true);
243
+ };
244
+
245
+ $('#forum-save').contents().find('dl dt:contains("Título del tema")').parent().find('input').val(name);
246
+ $('#forum-save').contents().find('.subtitle:contains("Mensaje")').next().find('textarea').val(content);
247
+ $('#forum-save').contents().find('.formbuttonrow.center input[value="Enviar"]').click();
248
+ };
249
+
250
+ document.querySelector('body > header').prepend(save);
251
+
252
+ const saveDOM = document.getElementById('forum-save');
253
+ });
254
+ }
255
+ },
256
+ user: {
257
+ getUrl: (name) => {
258
+ let character =
259
+ name !== undefined ? encodeURIComponent(name)
260
+ .replace(/[!'()]/g, escape)
261
+ .replace(/\*/g, "%2A") :
262
+ _userdata.user_id;
263
+
264
+ return "/profile?mode=viewprofile&u=" + character;
265
+ },
266
+ getLevel: () => {
267
+ return new Promise((resolve, reject) => {
268
+ switch (_userdata.user_level) {
269
+ case 2:
270
+ resolve('mod');
271
+ case 1:
272
+ resolve('admin');
273
+ case 0:
274
+ return -1 == _userdata.user_id ? resolve('guest') : resolve('user');
275
+ }
276
+ });
277
+ },
278
+ getGroup: () => {
279
+ return new Promise((resolve, reject) => {
280
+ FNR.user.getLevel().then((status) => {
281
+ if (status === 'guest') {
282
+ resolve('unknown');
283
+ } else {
284
+ FNR.user.getProfile(_userdata.user_id, .25).then((data) => {
285
+ resolve(data['colour']);
286
+ });
287
+ }
196
288
  });
197
- }
289
+ });
198
290
  },
199
- topic: {
200
- genTopic: function(id, name, content) {
291
+ getProfile: (name, time) => {
292
+ const character = name != undefined ? FNR.user.getUrl(name) : FNR.user.getUrl();
293
+ const cache = time || 5;
294
+
295
+ const processData = (content) => {
296
+ if (content.find('a').length) return Vue.filter('url-to-normal')(content.find('a').attr('href'));
297
+ else if (content.find('table').length) return content.find('table').html();
298
+ else if (content.find('img').length) return content.find('img').attr('src');
299
+ else if (content.find('textarea').length) return content.find('textarea').val();
300
+ else if (content.find('span').length) return content.find('span').text().trim();
301
+ else if (content.text().trim() === '-') return '';
302
+ else return content.text();
303
+ };
304
+
305
+ const getData = () => {
201
306
  return new Promise((resolve, reject) => {
202
- let save = document.createElement('iframe');
307
+ $.get(character + '&change_version=invision', (data) => {
308
+ let user = {};
203
309
 
204
- save.id = 'forum-save';
205
- save.src = '/post?f=' + id + '&mode=newtopic&change_version=invision';
206
- save.width = 0;
207
- save.height = 0;
208
- save.onload = () => {
209
- saveDOM.onload = () => {
210
- $('#forum-save').remove();
310
+ user['name'] = $(data).find('.maintitle h1 span').text();
311
+ user['lastvisit'] = $(data).find('dt:contains("Última visita")').parent().find('dd').text();
312
+ user['colour'] = FNR.utility.getGroup($(data).find('.maintitle h1 span').css('color').replace('rgb(', 'rgb_').replace(/, /g, '_').replace(')', ''));
313
+ user['avatar'] = $(data).find('.real_avatar img').attr('src');
211
314
 
212
- console.clear();
315
+ user['links'] = {
316
+ profile: '/u' + character.split('&u=')[1],
317
+ mp: '/privmsg?mode=post&u=' + character.split('&u=')[1],
318
+ };
213
319
 
214
- resolve(true);
320
+ user['messages'] = {
321
+ public: parseInt($(data).find('span:contains("Mensajes")').parent().parent().find('dd > div').text()) || 0,
322
+ private: parseInt($(data).find('dt:contains("Mensajes privados")').parent().find('dd').text()) || 0
215
323
  };
216
324
 
217
- $('#forum-save').contents().find('dl dt:contains("Título del tema")').parent().find('input').val(name);
218
- $('#forum-save').contents().find('.subtitle:contains("Mensaje")').next().find('textarea').val(content);
219
- $('#forum-save').contents().find('.formbuttonrow.center input[value="Enviar"]').click();
220
- };
325
+ user['fields'] = {};
221
326
 
222
- document.querySelector('body > header').prepend(save);
327
+ $(data).find('dl[id^="field_id"]').each(function() {
328
+ if ($(this).find('dt span').text() !== '') {
329
+ if ($(this).find('dt span').text() === 'Mensajes') return;
223
330
 
224
- const saveDOM = document.getElementById('forum-save');
331
+ user.fields[FNR.utility.genSlug($(this).find('dt span').text())] = {
332
+ name: $(this).find('dt span').text(),
333
+ content: processData($(this).find('dd .field_uneditable'))
334
+ }
335
+ }
336
+ });
337
+
338
+ $(data).find('.ipbform2 > dl').each(function() {
339
+ if ($(this).find('dt span').length && $(this).find('dt span').text() !== '') {
340
+ if ($(this).find('dt span').text() === 'Mensajes') return;
341
+
342
+ user.fields[FNR.utility.genSlug($(this).find('dt span').text())] = {
343
+ name: $(this).find('dt span').text(),
344
+ content: processData($(this).find('dd'))
345
+ }
346
+ }
347
+ });
348
+
349
+ user.fields['rango'] = {
350
+ name: 'Rango',
351
+ content: $(data).find('dt:contains("Rango:")').parent().find('dd').text()
352
+ }
353
+
354
+ resolve(user);
355
+ });
225
356
  });
226
- },
227
- isAutosave: function() {
228
- if (document.post === undefined) return false;
229
- else return _userdata.user_id !== -1 && document.post.mode.value === 'reply' && document.post.t !== undefined
230
- }
231
- }
232
- },
233
- user: {
234
- changeAccount: function(out, username, password) {
357
+ };
358
+
359
+ const readUserCache = (dat) => {
360
+ const id = "userInfo" + dat;
361
+
362
+ return new Promise((resolve, reject) => {
363
+ FNR.cache.useData(id, cache).then(
364
+ (result) => {
365
+ resolve(result);
366
+ },
367
+ (err) => {
368
+ getData().then((data) => {
369
+ FNR.cache.setData(id, data);
370
+
371
+ resolve(data);
372
+ });
373
+ }
374
+ );
375
+ });
376
+ };
377
+
378
+ return readUserCache(name);
379
+ },
380
+ changeAccount: (out, username, password) => {
235
381
  return new Promise((resolve, reject) => {
236
382
  let save = document.createElement('iframe');
237
383
 
@@ -261,16 +407,7 @@ const FNR = {
261
407
  });
262
408
  },
263
409
  profile: {
264
- getUrl: function(name) {
265
- let character =
266
- name !== undefined ? encodeURIComponent(name)
267
- .replace(/[!'()]/g, escape)
268
- .replace(/\*/g, "%2A") :
269
- _userdata.user_id;
270
-
271
- return "/profile?mode=viewprofile&u=" + character;
272
- },
273
- getData: function(array) {
410
+ getData: (array) => {
274
411
  return new Promise((resolve, reject) => {
275
412
  $.get('/profile?change_version=invision&mode=editprofile', (data) => {
276
413
  const fields = data;
@@ -335,7 +472,7 @@ const FNR = {
335
472
  });
336
473
  });
337
474
  },
338
- setData: function(array) {
475
+ setData: (array) => {
339
476
  return new Promise((resolve, reject) => {
340
477
  const resolveSetter = () => {
341
478
  $('#forum-save').remove();
@@ -399,96 +536,7 @@ const FNR = {
399
536
  const saveDOM = document.getElementById('forum-save');
400
537
  });
401
538
  },
402
- getAll: function(name, time) {
403
- const character = name != undefined ? FNR.user.profile.getUrl(name) : FNR.user.profile.getUrl();
404
- const cache = time || 5;
405
-
406
- const processData = (content) => {
407
- if (content.find('a').length) return Vue.filter('url-to-normal')(content.find('a').attr('href'));
408
- else if (content.find('table').length) return content.find('table').html();
409
- else if (content.find('img').length) return content.find('img').attr('src');
410
- else if (content.find('textarea').length) return content.find('textarea').val();
411
- else if (content.find('span').length) return content.find('span').text().trim();
412
- else if (content.text().trim() === '-') return '';
413
- else return content.text();
414
- };
415
-
416
- const getData = () => {
417
- return new Promise((resolve, reject) => {
418
- $.get(character + '&change_version=invision', (data) => {
419
- let user = {};
420
-
421
- user['name'] = $(data).find('.maintitle h1 span').text();
422
- user['lastvisit'] = $(data).find('dt:contains("Última visita")').parent().find('dd').text();
423
- user['colour'] = FNR.utility.getGroup($(data).find('.maintitle h1 span').css('color').replace('rgb(', 'rgb_').replace(/, /g, '_').replace(')', ''));
424
- user['avatar'] = $(data).find('.real_avatar img').attr('src');
425
-
426
- user['links'] = {
427
- profile: '/u' + character.split('&u=')[1],
428
- mp: '/privmsg?mode=post&u=' + character.split('&u=')[1],
429
- };
430
-
431
- user['messages'] = {
432
- public: parseInt($(data).find('span:contains("Mensajes")').parent().parent().find('dd > div').text()) || 0,
433
- private: parseInt($(data).find('dt:contains("Mensajes privados")').parent().find('dd').text()) || 0
434
- };
435
-
436
- user['fields'] = {};
437
-
438
- $(data).find('dl[id^="field_id"]').each(function() {
439
- if ($(this).find('dt span').text() !== '') {
440
- if ($(this).find('dt span').text() === 'Mensajes') return;
441
-
442
- user.fields[FNR.utility.genSlug($(this).find('dt span').text())] = {
443
- name: $(this).find('dt span').text(),
444
- content: processData($(this).find('dd .field_uneditable'))
445
- }
446
- }
447
- });
448
-
449
- $(data).find('.ipbform2 > dl').each(function() {
450
- if ($(this).find('dt span').length && $(this).find('dt span').text() !== '') {
451
- if ($(this).find('dt span').text() === 'Mensajes') return;
452
-
453
- user.fields[FNR.utility.genSlug($(this).find('dt span').text())] = {
454
- name: $(this).find('dt span').text(),
455
- content: processData($(this).find('dd'))
456
- }
457
- }
458
- });
459
-
460
- user.fields['rango'] = {
461
- name: 'Rango',
462
- content: $(data).find('dt:contains("Rango:")').parent().find('dd').text()
463
- }
464
-
465
- resolve(user);
466
- });
467
- });
468
- };
469
-
470
- const readUserCache = (dat) => {
471
- const id = "userInfo" + dat;
472
-
473
- return new Promise((resolve, reject) => {
474
- FNR.cache.useData(id, cache).then(
475
- (result) => {
476
- resolve(result);
477
- },
478
- (err) => {
479
- getData().then((data) => {
480
- FNR.cache.setData(id, data);
481
-
482
- resolve(data);
483
- });
484
- }
485
- );
486
- });
487
- };
488
-
489
- return readUserCache(name);
490
- },
491
- getDrafts: function() {
539
+ getDrafts: () => {
492
540
  return new Promise((resolve, reject) => {
493
541
  $.get('/search?search_id=draftsearch&change_version=invision', (data) => {
494
542
  if (parseFloat($(data).find('.maintitle > h3').text()) !== 0) {
@@ -520,7 +568,11 @@ const FNR = {
520
568
  }
521
569
  },
522
570
  cache: {
523
- setData: function(id, data, time) {
571
+ getData: (id) => {
572
+ if (localStorage.getItem(forumData.prefix + '_' + id) === null) return false;
573
+ else return JSON.parse(localStorage.getItem(forumData.prefix + '_' + id)).content;
574
+ },
575
+ setData: (id, data, time) => {
524
576
  let cur_date = time === -1 ? 'undefined' : new Date().getTime();
525
577
 
526
578
  localStorage.setItem(
@@ -531,15 +583,11 @@ const FNR = {
531
583
  })
532
584
  );
533
585
  },
534
- getData: function(id) {
535
- if (localStorage.getItem(forumData.prefix + '_' + id) === null) return false;
536
- else return JSON.parse(localStorage.getItem(forumData.prefix + '_' + id)).content;
537
- },
538
- delData: function(id) {
586
+ delData: (id) => {
539
587
  if (localStorage.getItem(forumData.prefix + '_' + id) === null) return false;
540
588
  else return localStorage.removeItem(forumData.prefix + '_' + id);
541
589
  },
542
- useData: function(id, time) {
590
+ useData: (id, time) => {
543
591
  return new Promise((resolve, reject) => {
544
592
  let item = localStorage.getItem(forumData.prefix + '_' + id),
545
593
  cur_date = new Date(),
@@ -554,7 +602,7 @@ const FNR = {
554
602
  },
555
603
  },
556
604
  utility: {
557
- genSlug: function(text, alt) {
605
+ genSlug: (text, alt) => {
558
606
  const slug = (Q) => {
559
607
  const R = '\xE0\xE1\xE4\xE2\xE8\xE9\xEB\xEA\xEC\xED\xEF\xEE\xF2\xF3\xF6\xF4\xF9\xFA\xFC\xFB\xF1\xE7\xB7/_,:;';
560
608
  Q = Q.trim().toLowerCase();
@@ -566,10 +614,10 @@ const FNR = {
566
614
 
567
615
  return slug(text).replace(/-/g, replace);
568
616
  },
569
- genArray: function(string) {
617
+ genArray: (string) => {
570
618
  return JSON.parse(string.replace(/`/g, '"'));
571
619
  },
572
- genValidation: function(array) {
620
+ genValidation: (array) => {
573
621
  let final = '';
574
622
 
575
623
  [].forEach.call(array, (item) => {
@@ -590,7 +638,7 @@ const FNR = {
590
638
 
591
639
  return final;
592
640
  },
593
- getGroup: function(color) {
641
+ getGroup: (color) => {
594
642
  const returnHexVer = (code) => {
595
643
  let status = 'unknown';
596
644
 
@@ -619,7 +667,7 @@ const FNR = {
619
667
  }
620
668
  },
621
669
  html: {
622
- genModal: function(title, content, buttons) {
670
+ genModal: (title, content, buttons) => {
623
671
  if (title === '' || title === undefined || title === null) return;
624
672
  if (content === '' || content === undefined || content === null) return;
625
673
 
@@ -656,7 +704,7 @@ const FNR = {
656
704
 
657
705
  document.getElementById('forum-modal').innerHTML = final;
658
706
  },
659
- genPrompt: function(title, content, placeholder, text) {
707
+ genPrompt: (title, content, placeholder, text) => {
660
708
  if (title === '' || title === undefined || title === null) return;
661
709
  if (content === '' || content === undefined || content === null) return;
662
710
 
@@ -691,7 +739,7 @@ const FNR = {
691
739
  };
692
740
  });
693
741
  },
694
- genNotification: function(title, content, icon, url) {
742
+ genNotification: (title, content, icon, url) => {
695
743
  if (title === '' || title === undefined || title === null) return;
696
744
  if (content === '' || content === undefined || content === null) return;
697
745
  if (content.length > 50) return;
@@ -749,7 +797,7 @@ const FNR = {
749
797
  }
750
798
  },
751
799
  behaviour: {
752
- genWiki: function() {
800
+ genWiki: () => {
753
801
  if (document.querySelector('.wiki-cascade')) {
754
802
  [].forEach.call(document.getElementsByClassName('wiki-cascade'), (item) => {
755
803
  item.onclick = () => {
@@ -793,7 +841,7 @@ const FNR = {
793
841
  };
794
842
  }
795
843
  },
796
- genDropeable: function() {
844
+ genDropeable: () => {
797
845
  if (document.querySelector('.is-dropeable')) {
798
846
  [].forEach.call(document.getElementsByClassName('is-dropeable'), (item) => {
799
847
  item.onclick = () => {