generic-skin 3.7.7 → 3.7.8

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.
@@ -390,137 +390,6 @@ const FNR = {
390
390
  return false;
391
391
  }
392
392
  },
393
- profile: {
394
- getData: (array) => {
395
- return new Promise((resolve, reject) => {
396
- $.get('/profile?change_version=invision&mode=editprofile', (data) => {
397
- const fields = data;
398
-
399
- $.get('/profile?change_version=invision&mode=editprofile&page_profil=avatars', (data) => {
400
- const avatar = data;
401
-
402
- let result = [];
403
-
404
- [].forEach.call(array, (item) => {
405
- let value = '',
406
- options = [];
407
-
408
- switch (item.type) {
409
- case 'input':
410
- value = $(fields).find('dl:contains("' + item.name + '")').find('dd').find('input').val();
411
- break;
412
-
413
- case 'textarea':
414
- value = $(fields).find('dl:contains("' + item.name + '")').find('dd').find('textarea').val();
415
- break;
416
-
417
- case 'select':
418
- value = $(fields).find('dl:contains("' + item.name + '")').find('dd').find('select option:selected').attr('value');
419
-
420
- $(fields).find('dl:contains("' + item.name + '")').find('dd').find('select option').each(function() {
421
- if ($(this).attr('value') === '') return;
422
-
423
- options.push({
424
- name: $(this).text(),
425
- value: $(this).attr('value')
426
- });
427
- });
428
- break;
429
-
430
- case 'avatar':
431
- value = $(avatar).find('.box-content img').attr('src');
432
- break;
433
- }
434
-
435
- if (item.type === 'select' && value === undefined || item.type === 'select' && value === '') return;
436
-
437
- let final = {
438
- type: item.type,
439
- name: item.name,
440
- value: value
441
- };
442
-
443
- if (item.validation) {
444
- final.validation = item.validation;
445
- }
446
-
447
- if (options.length) {
448
- final.options = options;
449
- }
450
-
451
- result.push(final);
452
- });
453
-
454
- resolve(result);
455
- });
456
- });
457
- });
458
- },
459
- setData: (array) => {
460
- return new Promise((resolve, reject) => {
461
- const resolveSetter = () => {
462
- $('#forum-save').remove();
463
-
464
- console.clear();
465
-
466
- resolve(true);
467
- };
468
-
469
- let save = document.createElement('iframe');
470
-
471
- save.id = 'forum-save';
472
- save.src = '/profile?change_version=invision&mode=editprofile';
473
- save.width = 0;
474
- save.height = 0;
475
- save.onload = () => {
476
- let avatar = false;
477
-
478
- [].forEach.call(array, (item) => {
479
- switch (item.type) {
480
- case 'input':
481
- $('#forum-save').contents().find('dl:contains("' + item.name + '")').find('dd').find('input').first().val(item.value);
482
- break;
483
-
484
- case 'textarea':
485
- $('#forum-save').contents().find('dl:contains("' + item.name + '")').find('dd').find('textarea').val(item.value);
486
- break;
487
-
488
- case 'select':
489
- $('#forum-save').contents().find('dl:contains("' + item.name + '")').find('dd').find('select option[value="' + item.value + '"]').attr('selected', 'selected');
490
- break;
491
-
492
- case 'avatar':
493
- avatar = item.value;
494
- break;
495
- }
496
- });
497
-
498
- saveDOM.onload = () => {
499
- if (!avatar) {
500
- resolveSetter();
501
- } else {
502
- saveDOM.onload = () => {
503
- saveDOM.onload = () => {
504
- resolveSetter();
505
- }
506
-
507
- $('#forum-save').contents().find('input[name="avatarremoteurl"]').val(avatar);
508
- $('#forum-save').contents().find('input[type="submit"][value="Registrar"]').click();
509
- }
510
-
511
- saveDOM.src = '/profile?change_version=invision&mode=editprofile&page_profil=avatars';
512
- }
513
- };
514
-
515
- $('#forum-save').contents().find('input[type="submit"][value="Registrar"]').click();
516
- };
517
-
518
- document.querySelector('body > header').prepend(save);
519
-
520
- const saveDOM = document.getElementById('forum-save');
521
- });
522
- }
523
- },
524
393
  followed: {
525
394
  getPages: async () => {
526
395
  try {
@@ -663,6 +532,137 @@ const FNR = {
663
532
  return false;
664
533
  }
665
534
  }
535
+ },
536
+ profile: {
537
+ getData: (array) => {
538
+ return new Promise((resolve, reject) => {
539
+ $.get('/profile?change_version=invision&mode=editprofile', (data) => {
540
+ const fields = data;
541
+
542
+ $.get('/profile?change_version=invision&mode=editprofile&page_profil=avatars', (data) => {
543
+ const avatar = data;
544
+
545
+ let result = [];
546
+
547
+ [].forEach.call(array, (item) => {
548
+ let value = '',
549
+ options = [];
550
+
551
+ switch (item.type) {
552
+ case 'input':
553
+ value = $(fields).find('dl:contains("' + item.name + '")').find('dd').find('input').val();
554
+ break;
555
+
556
+ case 'textarea':
557
+ value = $(fields).find('dl:contains("' + item.name + '")').find('dd').find('textarea').val();
558
+ break;
559
+
560
+ case 'select':
561
+ value = $(fields).find('dl:contains("' + item.name + '")').find('dd').find('select option:selected').attr('value');
562
+
563
+ $(fields).find('dl:contains("' + item.name + '")').find('dd').find('select option').each(function() {
564
+ if ($(this).attr('value') === '') return;
565
+
566
+ options.push({
567
+ name: $(this).text(),
568
+ value: $(this).attr('value')
569
+ });
570
+ });
571
+ break;
572
+
573
+ case 'avatar':
574
+ value = $(avatar).find('.box-content img').attr('src');
575
+ break;
576
+ }
577
+
578
+ if (item.type === 'select' && value === undefined || item.type === 'select' && value === '') return;
579
+
580
+ let final = {
581
+ type: item.type,
582
+ name: item.name,
583
+ value: value
584
+ };
585
+
586
+ if (item.validation) {
587
+ final.validation = item.validation;
588
+ }
589
+
590
+ if (options.length) {
591
+ final.options = options;
592
+ }
593
+
594
+ result.push(final);
595
+ });
596
+
597
+ resolve(result);
598
+ });
599
+ });
600
+ });
601
+ },
602
+ setData: (array) => {
603
+ return new Promise((resolve, reject) => {
604
+ const resolveSetter = () => {
605
+ $('#forum-save').remove();
606
+
607
+ console.clear();
608
+
609
+ resolve(true);
610
+ };
611
+
612
+ let save = document.createElement('iframe');
613
+
614
+ save.id = 'forum-save';
615
+ save.src = '/profile?change_version=invision&mode=editprofile';
616
+ save.width = 0;
617
+ save.height = 0;
618
+ save.onload = () => {
619
+ let avatar = false;
620
+
621
+ [].forEach.call(array, (item) => {
622
+ switch (item.type) {
623
+ case 'input':
624
+ $('#forum-save').contents().find('dl:contains("' + item.name + '")').find('dd').find('input').first().val(item.value);
625
+ break;
626
+
627
+ case 'textarea':
628
+ $('#forum-save').contents().find('dl:contains("' + item.name + '")').find('dd').find('textarea').val(item.value);
629
+ break;
630
+
631
+ case 'select':
632
+ $('#forum-save').contents().find('dl:contains("' + item.name + '")').find('dd').find('select option[value="' + item.value + '"]').attr('selected', 'selected');
633
+ break;
634
+
635
+ case 'avatar':
636
+ avatar = item.value;
637
+ break;
638
+ }
639
+ });
640
+
641
+ saveDOM.onload = () => {
642
+ if (!avatar) {
643
+ resolveSetter();
644
+ } else {
645
+ saveDOM.onload = () => {
646
+ saveDOM.onload = () => {
647
+ resolveSetter();
648
+ }
649
+
650
+ $('#forum-save').contents().find('input[name="avatarremoteurl"]').val(avatar);
651
+ $('#forum-save').contents().find('input[type="submit"][value="Registrar"]').click();
652
+ }
653
+
654
+ saveDOM.src = '/profile?change_version=invision&mode=editprofile&page_profil=avatars';
655
+ }
656
+ };
657
+
658
+ $('#forum-save').contents().find('input[type="submit"][value="Registrar"]').click();
659
+ };
660
+
661
+ document.querySelector('body > header').prepend(save);
662
+
663
+ const saveDOM = document.getElementById('forum-save');
664
+ });
665
+ }
666
666
  }
667
667
  },
668
668
  cache: {
@@ -1 +1 @@
1
- const FNR={execFn:e=>{document.addEventListener("forumReady",e,!1)},forum:{getColors:()=>Object.values(forumColours).map(e=>({name:e.code,hex:e.hex})),getTopics:async(e,t)=>{const n=e=>{const t=$(e).find(".topictitle"),n=$(e).children().last();a.push({name:t.text().trim(),url:Vue.filter("url-to-normal")(t.attr("href")),lastpost:{url:Vue.filter("url-to-normal")(n.children().last().attr("href")),date:n.text().split("por")[0].trim(),who:{name:n.find("strong a").length?n.find("strong a").text().trim():"Invitado",url:Vue.filter("url-to-normal")(n.find("strong a").length?n.find("strong a").attr("href"):"/"),color:n.find("strong a").length?n.find("strong a span").attr("style").split("color:")[1]:"initial"}},forum:{name:$(e).find(".row2 + .row2:not(.centered) a").text().trim(),url:Vue.filter("url-to-normal")($(e).find(".row2 + .row2:not(.centered) a").attr("href"))}})},i=async o=>{$.get(o,o=>($(o).find(".ipbform").find("tbody").find("tr").each(function(){a.length<t&&-1===e.indexOf(parseInt($(this).find(".row2 + .row2:not(.centered) a").attr("href").split("/f")[1].split("-")[0]))&&n(this)}),a.length!==t&&$(o).find(".pagination")[0].children.length&&"b"!==$(o).find(".pagination").children().last()[0].localName?i($(o).find(".pagination").children().last().attr("href")):a))};await i("/latest?change_version=invision");let a=[];return a},getMembers:e=>new Promise((t,n)=>{let i=[];const a=(e,t)=>({user:$(e).find(".membername span").text().trim(),id:$(e).find(".popupmenu .popupmenu-item a").attr("href").split("?")[0],img:$(e).find(".mini-avatar img").attr("src"),color:t}),o=t=>{let n=[];return $(t).find(".member-list .member").each(function(){const t=FNR.utility.getGroup($(this).find(".membername span").attr("style").split("color:")[1]);e?n.push(a(this,t)):"unknown"!==t&&t!==forumConfig.skinOptions.adminGroup&&n.push(a(this,t))}),n},r=e=>{$.get(e,e=>{const n=$(e).find('.pagination img[alt="Siguiente"]').parent().attr("href")||!1;i=i.concat(o(e)),n?r(n):t(i.sort((e,t)=>e.user<t.user?-1:e.user>t.user?1:0))})};r("/memberlist?change_version=invision")}),getGroups:e=>{const t=()=>new Promise((e,t)=>{$.get("/groups?change_version=invision",t=>{let n=[];$(t).find(".group_list > li").each(function(){n.push({id:parseInt($(this).find("a").attr("href").split("/g")[1].split("-")[0]),name:$(this).find("a").text().trim(),color:$(this).find("a").css("color"),url:Vue.filter("url-to-normal")($(this).find("a").attr("href")),count:parseInt($(this).find("div > span").text())-1})}),e(n)})}),n=()=>new Promise((n,i)=>{FNR.cache.useData("groups",e).then(e=>{n(e)},e=>{t().then(e=>{FNR.cache.setData("groups",e),n(e)})})});return n()},getAffiliates:()=>new Promise((e,t)=>{const n=forumConfig.affiliatesMax,i=Object.entries(forumAffiliates).map(e=>{let t="";e[1].forEach(e=>{t+='<li><a href="'+e.url+'" title="'+e.title+'" target="_blank"><img src="'+e.img+'" alt="'+e.title+'"/></a></li>'});for(let i=0;i<n[e[0]]-e[1].length;i++)t+='<li><a href="/" title="'+forumData.name+'"><img src="'+forumDefaults.affiliates[e[0]]+'" alt="'+forumData.name+'"/></a></li>';return t});e({normal:i[0],elite:i[1],directory:i[2],sister:i[3]})})},content:{isAutosave:()=>void 0!==document.post&&(-1!==_userdata.user_id&&"reply"===document.post.mode.value&&void 0!==document.post.t),getPost:e=>new Promise((t,n)=>{$.get(Vue.filter("url-to-invision")(e),n=>{const i=$(n).find("#p"+e.split("#")[1]);t({author:{text:i.find(".author a").text(),color:i.find(".author a span").css("color"),url:Vue.filter("url-to-normal")(i.find(".author a").attr("href"))},content:i.find(".post-entry > div").html(),date:i.find(".author").html().split("</a>")[1]})})}),genPost:(e,t)=>new Promise((n,i)=>{let a=document.createElement("iframe");a.id="forum-save",a.src="/post?t="+e+"&mode=reply&change_version=invision",a.width=0,a.height=0,a.onload=(()=>{o.onload=(()=>{$("#forum-save").remove(),console.clear(),n(!0)}),$("#forum-save").contents().find('.subtitle:contains("Mensaje")').next().find("textarea").val(t),$("#forum-save").contents().find('.formbuttonrow.center input[value="Enviar"]').click()}),document.querySelector("body > header").prepend(a);const o=document.getElementById("forum-save")}),genTopic:(e,t,n)=>new Promise((i,a)=>{let o=document.createElement("iframe");o.id="forum-save",o.src="/post?f="+e+"&mode=newtopic&change_version=invision",o.width=0,o.height=0,o.onload=(()=>{r.onload=(()=>{$("#forum-save").remove(),console.clear(),i(!0)}),$("#forum-save").contents().find('dl dt:contains("Título del tema")').parent().find("input").val(t),$("#forum-save").contents().find('.subtitle:contains("Mensaje")').next().find("textarea").val(n),$("#forum-save").contents().find('.formbuttonrow.center input[value="Enviar"]').click()}),document.querySelector("body > header").prepend(o);const r=document.getElementById("forum-save")})},user:{getUrl:e=>{let t=void 0!==e?encodeURIComponent(e).replace(/[!'()]/g,escape).replace(/\*/g,"%2A"):_userdata.user_id;return"/profile?mode=viewprofile&u="+t},getLevel:async()=>{switch(_userdata.user_level){case 2:return"mod";case 1:return"admin";case 0:return-1==_userdata.user_id?"guest":"user"}},getGroup:async()=>{const e=await FNR.user.getLevel();if("guest"===e)return"unknown";const{colour:t}=await FNR.user.getProfile(_userdata.user_id,.25);return t},getProfile:(e,t)=>{const n=null!=e?FNR.user.getUrl(e):FNR.user.getUrl(),i=t||5,a=e=>e.find("a").length?Vue.filter("url-to-normal")(e.find("a").attr("href")):e.find("table").length?e.find("table").html():e.find("img").length?e.find("img").attr("src"):e.find("textarea").length?e.find("textarea").val():e.find("span").length?e.find("span").text().trim():"-"===e.text().trim()?"":e.text(),o=()=>new Promise((e,t)=>{$.get(n+"&change_version=invision",t=>{let i={};i.name=$(t).find(".maintitle h1 span").text(),i.lastvisit=$(t).find('dt:contains("Última visita")').parent().find("dd").text(),i.colour=FNR.utility.getGroup($(t).find(".maintitle h1 span").css("color").replace("rgb(","rgb_").replace(/, /g,"_").replace(")","")),i.avatar=$(t).find(".real_avatar img").attr("src"),i.links={profile:"/u"+n.split("&u=")[1],mp:"/privmsg?mode=post&u="+n.split("&u=")[1]},i.messages={public:parseInt($(t).find('span:contains("Mensajes")').parent().parent().find("dd > div").text())||0,private:parseInt($(t).find('dt:contains("Mensajes privados")').parent().find("dd").text())||0},i.fields={},$(t).find('dl[id^="field_id"]').each(function(){if(""!==$(this).find("dt span").text()){if("Mensajes"===$(this).find("dt span").text())return;i.fields[FNR.utility.genSlug($(this).find("dt span").text())]={name:$(this).find("dt span").text(),content:a($(this).find("dd .field_uneditable"))}}}),$(t).find(".ipbform2 > dl").each(function(){if($(this).find("dt span").length&&""!==$(this).find("dt span").text()){if("Mensajes"===$(this).find("dt span").text())return;i.fields[FNR.utility.genSlug($(this).find("dt span").text())]={name:$(this).find("dt span").text(),content:a($(this).find("dd"))}}}),i.fields.rango={name:"Rango",content:$(t).find('dt:contains("Rango:")').parent().find("dd").text()},e(i)})}),r=e=>{const t=`userInfo${e}`;return new Promise((e,n)=>{FNR.cache.useData(t,i).then(t=>{e(t)},n=>{o().then(n=>{FNR.cache.setData(t,n),e(n)})})})};return r(e)},changeAccount:async(e,t,n)=>{try{return await fetch(e),await fetch("/login",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`username=${encodeURIComponent(t)}&password=${encodeURIComponent(n)}&autologin=1&login=1`}),!0}catch(e){return console.error("Error inesperado",e),!1}},profile:{getData:e=>new Promise((t,n)=>{$.get("/profile?change_version=invision&mode=editprofile",n=>{const i=n;$.get("/profile?change_version=invision&mode=editprofile&page_profil=avatars",n=>{const a=n;let o=[];[].forEach.call(e,e=>{let t="",n=[];switch(e.type){case"input":t=$(i).find('dl:contains("'+e.name+'")').find("dd").find("input").val();break;case"textarea":t=$(i).find('dl:contains("'+e.name+'")').find("dd").find("textarea").val();break;case"select":t=$(i).find('dl:contains("'+e.name+'")').find("dd").find("select option:selected").attr("value"),$(i).find('dl:contains("'+e.name+'")').find("dd").find("select option").each(function(){""!==$(this).attr("value")&&n.push({name:$(this).text(),value:$(this).attr("value")})});break;case"avatar":t=$(a).find(".box-content img").attr("src")}if("select"===e.type&&void 0===t||"select"===e.type&&""===t)return;let r={type:e.type,name:e.name,value:t};e.validation&&(r.validation=e.validation),n.length&&(r.options=n),o.push(r)}),t(o)})})}),setData:e=>new Promise((t,n)=>{const i=()=>{$("#forum-save").remove(),console.clear(),t(!0)};let a=document.createElement("iframe");a.id="forum-save",a.src="/profile?change_version=invision&mode=editprofile",a.width=0,a.height=0,a.onload=(()=>{let t=!1;[].forEach.call(e,e=>{switch(e.type){case"input":$("#forum-save").contents().find('dl:contains("'+e.name+'")').find("dd").find("input").first().val(e.value);break;case"textarea":$("#forum-save").contents().find('dl:contains("'+e.name+'")').find("dd").find("textarea").val(e.value);break;case"select":$("#forum-save").contents().find('dl:contains("'+e.name+'")').find("dd").find('select option[value="'+e.value+'"]').attr("selected","selected");break;case"avatar":t=e.value}}),o.onload=(()=>{t?(o.onload=(()=>{o.onload=(()=>{i()}),$("#forum-save").contents().find('input[name="avatarremoteurl"]').val(t),$("#forum-save").contents().find('input[type="submit"][value="Registrar"]').click()}),o.src="/profile?change_version=invision&mode=editprofile&page_profil=avatars"):i()}),$("#forum-save").contents().find('input[type="submit"][value="Registrar"]').click()}),document.querySelector("body > header").prepend(a);const o=document.getElementById("forum-save")})},followed:{getPages:async()=>{try{const e=await fetch("/search?search_id=watchsearch&change_version=invision"),t=await e.text(),n=document.createElement("html");n.innerHTML=t;const i=n.querySelectorAll(".pagination a");let a=[];if(i.length){const e=i[i.length-2],t=e.href.split(e.origin)[1],n=t.match(/[0-9]/g)||[],o=parseInt(n.join(""))||0,r=i[1],l=r.href.split(r.origin)[1],s=l.match(/[0-9]/g)||[],c=parseInt(s.join(""))||0,d=void 0===o?0:o/c;a=Array(d).fill(null).map((e,t)=>`/search?search_id=watchsearch&start=${c*(t+1)}&change_version=invision`)}return{items:n.querySelectorAll(".ipbtable tbody tr").length,pages:["/search?search_id=watchsearch&change_version=invision",...a]}}catch(e){return console.error("Error inesperado",e),!1}},getFollowed:async e=>{try{const t=await fetch(e),n=await t.text(),i=document.createElement("html");return i.innerHTML=n,Array.from(i.querySelectorAll(".ipbtable tbody tr")).map(e=>{const t=e.children;return{id:parseInt(t[7].children[0].value),name:t[1].querySelector(".topictitle").textContent.trim(),url:Vue.filter("url-to-normal")(t[1].querySelector(".topictitle").href),views:parseInt(t[5].textContent),replies:parseInt(t[3].textContent)}})}catch(e){return console.error("Error inesperado",e),!1}},delFollowed:async e=>{try{return await fetch("/search?search_id=watchsearch",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`confirm=confirm${e.map(e=>`&mark${encodeURIComponent("[]")}2=${e}`)}`}),!0}catch(e){return console.error("Error inesperado",e),!1}}},drafts:{getDrafts:async()=>{const e=(e,t)=>(final=[],e.querySelectorAll(".maintitle > h3").length&&0!==parseInt(e.querySelectorAll(".maintitle > h3")[0].textContent)&&[].forEach.call(e.querySelectorAll(".ipbform .ipbtable tbody > tr"),e=>{const n=e.querySelectorAll("td");final.push({topic:{name:n[t+1].textContent.trim(),url:Vue.filter("url-to-normal")(n[t+1].querySelector("a").href)},info:{location:n[t+2].textContent.trim(),date:n[t+3].textContent.trim()},modify:Vue.filter("url-to-normal")(n[t+4].querySelector("a").href)})}),final);try{const t=await fetch("/search?search_id=draftsearch&change_version=invision"),n=await fetch("/search?search_id=topicdraftsearch&change_version=invision"),i=await t.text(),a=await n.text(),o=document.createElement("html"),r=document.createElement("html");return o.innerHTML=i,r.innerHTML=a,{msgDrafts:e(o,0),topicDrafts:e(r,-1)}}catch(e){return!1}},delDrafts:async(e,t)=>{try{const n="draft"===e?"draft":"topic_draft";return await fetch(`/search?search_id=${e}search`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`confirm=confirm${t.map(e=>`&delete_${n}${encodeURIComponent(`[${e}]`)}=on`)}`}),!0}catch(e){return console.error("Error inesperado",e),!1}}}},cache:{getData:e=>null!==localStorage.getItem(forumData.prefix+"_"+e)&&JSON.parse(localStorage.getItem(forumData.prefix+"_"+e)).content,setData:(e,t,n)=>{let i=-1===n?"undefined":(new Date).getTime();localStorage.setItem(forumData.prefix+"_"+e,JSON.stringify({cached_at:i,content:t}))},delData:e=>null!==localStorage.getItem(forumData.prefix+"_"+e)&&localStorage.removeItem(forumData.prefix+"_"+e),useData:async(e,t)=>{const n=localStorage.getItem(forumData.prefix+"_"+e),i=new Date,a=-1==t?"undefined":864e5*t;return null!=n&&-1==t||null!=n&&parseInt(JSON.parse(n).cached_at)+a>i.getTime()?JSON.parse(n).content:Promise.reject(!1)}},utility:{genSlug:(e,t)=>{const n=e=>{const t="àáäâèéëêìíïîòóöôùúüûñç·/_,:;";e=e.trim().toLowerCase();for(var n=0,i=t.length;n<i;n++)e=e.replace(new RegExp(t.charAt(n),"g"),"aaaaeeeeiiiioooouuuunc------".charAt(n));return e.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")},i=t||"_";return n(e).replace(/-/g,i)},genArray:e=>JSON.parse(e.replace(/`/g,'"')),genValidation:e=>{let t="";return[].forEach.call(e,e=>{switch(e.validation){case"hex":e.value.match(/^#[a-f0-9]{6}$/i)||(t+="<li>El campo de "+e.name.toLowerCase()+" debe incluir un código de color hexadecimal.</li>");break;case"img":e.value.match(/(jpg|jpeg|png)$/i)||(t+="<li>El campo de "+e.name.toLowerCase()+" debe ser el enlace a una imagen (formato png, jpg o jpeg).</li>")}}),t},getGroup:e=>{const t=e=>{let t="unknown";return Object.values(forumColours).map(n=>{n.hex===e.toLowerCase()&&(t=FNR.utility.genSlug(n.code))}),t},n=e=>{let t="unknown";return Object.values(forumColours).map(n=>{n.id===e&&(t=FNR.utility.genSlug(n.code))}),t};return void 0===e?"unknown":e.indexOf("#")>-1?t(e):e.indexOf("id_")>-1?n(parseFloat(e.split("_")[1])):void 0===forumColours[e]?"unknown":FNR.utility.genSlug(forumColours[e].code)}},html:{genModal:(e,t,n)=>{if(""===e||null==e)return;if(""===t||null==t)return;let i=document.createElement("div");i.id="forum-modal",document.body.appendChild(i);let a="";a+='<div id="'+FNR.utility.genSlug(e,"-")+'" class="modal-element">',a+='<div class="modal-title">',a+="<h3>"+e+"</h3>",a+='<a onclick="document.getElementById(`forum-modal`).remove()">',a+='<i class="fas fa-times"></i>',a+="</a>",a+="</div>",a+='<div class="modal-content">',a+='<div class="is-content">',a+=t.replace(/\n/g,"<br>"),a+="</div>",""!==n&&null!=n&&(a+='<div class="modal-buttons">',a+=n,a+="</div>"),a+="</div>",a+="</div>",a+='<div class="is-bgmodal bg-active" onclick="document.getElementById(`forum-modal`).remove()"></div>',document.getElementById("forum-modal").innerHTML=a},genPrompt:(e,t,n,i)=>{if(""!==e&&null!=e&&""!==t&&null!=t)return new Promise((a,o)=>{FNR.html.genModal(e,"<p>"+t+'</p><p><input id="modal-prompt" type="text" placeholder="'+n+'" value="'+i+'"></p>','<button id="modal-button-enter" class="button1 btn-main">Confirmar</button><button id="modal-button-cancel" class="button1">Cancelar</button>'),document.querySelector("#modal-button-enter").onclick=(()=>{const e=document.querySelector("#modal-prompt").value;a(""!==e&&e),document.getElementById("forum-modal").remove()}),document.querySelector("#modal-button-cancel").onclick=(()=>{o(!1),document.getElementById("forum-modal").remove()}),document.querySelector(".modal-title a").onclick=(()=>{o(!1),document.getElementById("forum-modal").remove()}),document.querySelector(".is-bgmodal.bg-active").onclick=(()=>{o(!1),document.getElementById("forum-modal").remove()})})},genNotification:(e,t,n,i)=>{if(""===e||null==e)return;if(""===t||null==t)return;if(t.length>50)return;if(""===n||null==n)return;document.querySelectorAll("forum-notification").length&&(document.getElementById("forum-notification").remove(),clearTimeout());let a=document.createElement("div");a.id="forum-notification",document.body.appendChild(a);let o="";o+=""===i||null==i?'<div id="'+FNR.utility.genSlug(e,"-")+'" class="notification-element" onclick="document.querySelector(`#forum-notification`).classList.remove(`notification-show`)" >':'<a href="'+i+'" target="_blank" id="'+FNR.utility.genSlug(e,"-")+'" class="notification-element" onclick="document.querySelector(`#forum-notification`).classList.remove(`notification-show`)" >',o+='<div class="notification-icon">',o+='<i class="'+n+'"></i>',o+="</div>",o+='<div class="notification-content">',o+="<h3>"+e+"</h3>",o+="<p>"+t+"</p>",o+="</div>",o+='<div class="notification-controls">',o+='<i class="fas fa-times"></i>',o+="</div>",o+=""===i||null==i?"</div>":"</a>",document.getElementById("forum-notification").innerHTML=o,setTimeout(()=>{document.getElementById("forum-notification").classList.add("notification-show")},250),setTimeout(()=>{document.getElementById("forum-notification").classList.remove("notification-show")},8e3),setTimeout(()=>{document.getElementById("forum-notification").remove()},1e4)}},behaviour:{genWiki:()=>{document.querySelector(".wiki-cascade")&&[].forEach.call(document.getElementsByClassName("wiki-cascade"),e=>{e.onclick=(()=>{const t=e.parentElement.parentElement;t.classList.contains("is-active")?t.classList.remove("is-active"):t.classList.add("is-active")})}),document.querySelector(".wiki-controls .router-link-active")&&[].forEach.call(document.querySelectorAll(".wiki-controls .router-link-active"),e=>{if(!e.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("wiki-index")){const t=(e,n)=>{let i=e.parentElement.parentElement;n&&(i=i.parentElement.parentElement),i.classList.add("is-active"),i.classList.add("is-selected"),i.parentElement.parentElement.parentElement.classList.contains("wiki-index")||t(i,!1)};t(e,!0)}}),document.querySelector("aside.wiki-index > .select-container > select")&&(document.querySelector("aside.wiki-index > .select-container > select").onchange=(()=>{router.push(document.querySelector("aside.wiki-index > .select-container > select").value)}))},genDropeable:()=>{document.querySelector(".is-dropeable")&&[].forEach.call(document.getElementsByClassName("is-dropeable"),e=>{e.onclick=(()=>{e.classList.contains("is-active")?e.classList.remove("is-active"):([].forEach.call(document.getElementsByClassName("is-dropeable"),e=>{e.classList.remove("is-active")}),e.classList.add("is-active"))})})}}};
1
+ const FNR={execFn:e=>{document.addEventListener("forumReady",e,!1)},forum:{getColors:()=>Object.values(forumColours).map(e=>({name:e.code,hex:e.hex})),getTopics:async(e,t)=>{const n=e=>{const t=$(e).find(".topictitle"),n=$(e).children().last();a.push({name:t.text().trim(),url:Vue.filter("url-to-normal")(t.attr("href")),lastpost:{url:Vue.filter("url-to-normal")(n.children().last().attr("href")),date:n.text().split("por")[0].trim(),who:{name:n.find("strong a").length?n.find("strong a").text().trim():"Invitado",url:Vue.filter("url-to-normal")(n.find("strong a").length?n.find("strong a").attr("href"):"/"),color:n.find("strong a").length?n.find("strong a span").attr("style").split("color:")[1]:"initial"}},forum:{name:$(e).find(".row2 + .row2:not(.centered) a").text().trim(),url:Vue.filter("url-to-normal")($(e).find(".row2 + .row2:not(.centered) a").attr("href"))}})},i=async o=>{$.get(o,o=>($(o).find(".ipbform").find("tbody").find("tr").each(function(){a.length<t&&-1===e.indexOf(parseInt($(this).find(".row2 + .row2:not(.centered) a").attr("href").split("/f")[1].split("-")[0]))&&n(this)}),a.length!==t&&$(o).find(".pagination")[0].children.length&&"b"!==$(o).find(".pagination").children().last()[0].localName?i($(o).find(".pagination").children().last().attr("href")):a))};await i("/latest?change_version=invision");let a=[];return a},getMembers:e=>new Promise((t,n)=>{let i=[];const a=(e,t)=>({user:$(e).find(".membername span").text().trim(),id:$(e).find(".popupmenu .popupmenu-item a").attr("href").split("?")[0],img:$(e).find(".mini-avatar img").attr("src"),color:t}),o=t=>{let n=[];return $(t).find(".member-list .member").each(function(){const t=FNR.utility.getGroup($(this).find(".membername span").attr("style").split("color:")[1]);e?n.push(a(this,t)):"unknown"!==t&&t!==forumConfig.skinOptions.adminGroup&&n.push(a(this,t))}),n},r=e=>{$.get(e,e=>{const n=$(e).find('.pagination img[alt="Siguiente"]').parent().attr("href")||!1;i=i.concat(o(e)),n?r(n):t(i.sort((e,t)=>e.user<t.user?-1:e.user>t.user?1:0))})};r("/memberlist?change_version=invision")}),getGroups:e=>{const t=()=>new Promise((e,t)=>{$.get("/groups?change_version=invision",t=>{let n=[];$(t).find(".group_list > li").each(function(){n.push({id:parseInt($(this).find("a").attr("href").split("/g")[1].split("-")[0]),name:$(this).find("a").text().trim(),color:$(this).find("a").css("color"),url:Vue.filter("url-to-normal")($(this).find("a").attr("href")),count:parseInt($(this).find("div > span").text())-1})}),e(n)})}),n=()=>new Promise((n,i)=>{FNR.cache.useData("groups",e).then(e=>{n(e)},e=>{t().then(e=>{FNR.cache.setData("groups",e),n(e)})})});return n()},getAffiliates:()=>new Promise((e,t)=>{const n=forumConfig.affiliatesMax,i=Object.entries(forumAffiliates).map(e=>{let t="";e[1].forEach(e=>{t+='<li><a href="'+e.url+'" title="'+e.title+'" target="_blank"><img src="'+e.img+'" alt="'+e.title+'"/></a></li>'});for(let i=0;i<n[e[0]]-e[1].length;i++)t+='<li><a href="/" title="'+forumData.name+'"><img src="'+forumDefaults.affiliates[e[0]]+'" alt="'+forumData.name+'"/></a></li>';return t});e({normal:i[0],elite:i[1],directory:i[2],sister:i[3]})})},content:{isAutosave:()=>void 0!==document.post&&(-1!==_userdata.user_id&&"reply"===document.post.mode.value&&void 0!==document.post.t),getPost:e=>new Promise((t,n)=>{$.get(Vue.filter("url-to-invision")(e),n=>{const i=$(n).find("#p"+e.split("#")[1]);t({author:{text:i.find(".author a").text(),color:i.find(".author a span").css("color"),url:Vue.filter("url-to-normal")(i.find(".author a").attr("href"))},content:i.find(".post-entry > div").html(),date:i.find(".author").html().split("</a>")[1]})})}),genPost:(e,t)=>new Promise((n,i)=>{let a=document.createElement("iframe");a.id="forum-save",a.src="/post?t="+e+"&mode=reply&change_version=invision",a.width=0,a.height=0,a.onload=(()=>{o.onload=(()=>{$("#forum-save").remove(),console.clear(),n(!0)}),$("#forum-save").contents().find('.subtitle:contains("Mensaje")').next().find("textarea").val(t),$("#forum-save").contents().find('.formbuttonrow.center input[value="Enviar"]').click()}),document.querySelector("body > header").prepend(a);const o=document.getElementById("forum-save")}),genTopic:(e,t,n)=>new Promise((i,a)=>{let o=document.createElement("iframe");o.id="forum-save",o.src="/post?f="+e+"&mode=newtopic&change_version=invision",o.width=0,o.height=0,o.onload=(()=>{r.onload=(()=>{$("#forum-save").remove(),console.clear(),i(!0)}),$("#forum-save").contents().find('dl dt:contains("Título del tema")').parent().find("input").val(t),$("#forum-save").contents().find('.subtitle:contains("Mensaje")').next().find("textarea").val(n),$("#forum-save").contents().find('.formbuttonrow.center input[value="Enviar"]').click()}),document.querySelector("body > header").prepend(o);const r=document.getElementById("forum-save")})},user:{getUrl:e=>{let t=void 0!==e?encodeURIComponent(e).replace(/[!'()]/g,escape).replace(/\*/g,"%2A"):_userdata.user_id;return"/profile?mode=viewprofile&u="+t},getLevel:async()=>{switch(_userdata.user_level){case 2:return"mod";case 1:return"admin";case 0:return-1==_userdata.user_id?"guest":"user"}},getGroup:async()=>{const e=await FNR.user.getLevel();if("guest"===e)return"unknown";const{colour:t}=await FNR.user.getProfile(_userdata.user_id,.25);return t},getProfile:(e,t)=>{const n=null!=e?FNR.user.getUrl(e):FNR.user.getUrl(),i=t||5,a=e=>e.find("a").length?Vue.filter("url-to-normal")(e.find("a").attr("href")):e.find("table").length?e.find("table").html():e.find("img").length?e.find("img").attr("src"):e.find("textarea").length?e.find("textarea").val():e.find("span").length?e.find("span").text().trim():"-"===e.text().trim()?"":e.text(),o=()=>new Promise((e,t)=>{$.get(n+"&change_version=invision",t=>{let i={};i.name=$(t).find(".maintitle h1 span").text(),i.lastvisit=$(t).find('dt:contains("Última visita")').parent().find("dd").text(),i.colour=FNR.utility.getGroup($(t).find(".maintitle h1 span").css("color").replace("rgb(","rgb_").replace(/, /g,"_").replace(")","")),i.avatar=$(t).find(".real_avatar img").attr("src"),i.links={profile:"/u"+n.split("&u=")[1],mp:"/privmsg?mode=post&u="+n.split("&u=")[1]},i.messages={public:parseInt($(t).find('span:contains("Mensajes")').parent().parent().find("dd > div").text())||0,private:parseInt($(t).find('dt:contains("Mensajes privados")').parent().find("dd").text())||0},i.fields={},$(t).find('dl[id^="field_id"]').each(function(){if(""!==$(this).find("dt span").text()){if("Mensajes"===$(this).find("dt span").text())return;i.fields[FNR.utility.genSlug($(this).find("dt span").text())]={name:$(this).find("dt span").text(),content:a($(this).find("dd .field_uneditable"))}}}),$(t).find(".ipbform2 > dl").each(function(){if($(this).find("dt span").length&&""!==$(this).find("dt span").text()){if("Mensajes"===$(this).find("dt span").text())return;i.fields[FNR.utility.genSlug($(this).find("dt span").text())]={name:$(this).find("dt span").text(),content:a($(this).find("dd"))}}}),i.fields.rango={name:"Rango",content:$(t).find('dt:contains("Rango:")').parent().find("dd").text()},e(i)})}),r=e=>{const t=`userInfo${e}`;return new Promise((e,n)=>{FNR.cache.useData(t,i).then(t=>{e(t)},n=>{o().then(n=>{FNR.cache.setData(t,n),e(n)})})})};return r(e)},changeAccount:async(e,t,n)=>{try{return await fetch(e),await fetch("/login",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`username=${encodeURIComponent(t)}&password=${encodeURIComponent(n)}&autologin=1&login=1`}),!0}catch(e){return console.error("Error inesperado",e),!1}},followed:{getPages:async()=>{try{const e=await fetch("/search?search_id=watchsearch&change_version=invision"),t=await e.text(),n=document.createElement("html");n.innerHTML=t;const i=n.querySelectorAll(".pagination a");let a=[];if(i.length){const e=i[i.length-2],t=e.href.split(e.origin)[1],n=t.match(/[0-9]/g)||[],o=parseInt(n.join(""))||0,r=i[1],l=r.href.split(r.origin)[1],s=l.match(/[0-9]/g)||[],c=parseInt(s.join(""))||0,d=void 0===o?0:o/c;a=Array(d).fill(null).map((e,t)=>`/search?search_id=watchsearch&start=${c*(t+1)}&change_version=invision`)}return{items:n.querySelectorAll(".ipbtable tbody tr").length,pages:["/search?search_id=watchsearch&change_version=invision",...a]}}catch(e){return console.error("Error inesperado",e),!1}},getFollowed:async e=>{try{const t=await fetch(e),n=await t.text(),i=document.createElement("html");return i.innerHTML=n,Array.from(i.querySelectorAll(".ipbtable tbody tr")).map(e=>{const t=e.children;return{id:parseInt(t[7].children[0].value),name:t[1].querySelector(".topictitle").textContent.trim(),url:Vue.filter("url-to-normal")(t[1].querySelector(".topictitle").href),views:parseInt(t[5].textContent),replies:parseInt(t[3].textContent)}})}catch(e){return console.error("Error inesperado",e),!1}},delFollowed:async e=>{try{return await fetch("/search?search_id=watchsearch",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`confirm=confirm${e.map(e=>`&mark${encodeURIComponent("[]")}2=${e}`)}`}),!0}catch(e){return console.error("Error inesperado",e),!1}}},drafts:{getDrafts:async()=>{const e=(e,t)=>(final=[],e.querySelectorAll(".maintitle > h3").length&&0!==parseInt(e.querySelectorAll(".maintitle > h3")[0].textContent)&&[].forEach.call(e.querySelectorAll(".ipbform .ipbtable tbody > tr"),e=>{const n=e.querySelectorAll("td");final.push({topic:{name:n[t+1].textContent.trim(),url:Vue.filter("url-to-normal")(n[t+1].querySelector("a").href)},info:{location:n[t+2].textContent.trim(),date:n[t+3].textContent.trim()},modify:Vue.filter("url-to-normal")(n[t+4].querySelector("a").href)})}),final);try{const t=await fetch("/search?search_id=draftsearch&change_version=invision"),n=await fetch("/search?search_id=topicdraftsearch&change_version=invision"),i=await t.text(),a=await n.text(),o=document.createElement("html"),r=document.createElement("html");return o.innerHTML=i,r.innerHTML=a,{msgDrafts:e(o,0),topicDrafts:e(r,-1)}}catch(e){return!1}},delDrafts:async(e,t)=>{try{const n="draft"===e?"draft":"topic_draft";return await fetch(`/search?search_id=${e}search`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`confirm=confirm${t.map(e=>`&delete_${n}${encodeURIComponent(`[${e}]`)}=on`)}`}),!0}catch(e){return console.error("Error inesperado",e),!1}}},profile:{getData:e=>new Promise((t,n)=>{$.get("/profile?change_version=invision&mode=editprofile",n=>{const i=n;$.get("/profile?change_version=invision&mode=editprofile&page_profil=avatars",n=>{const a=n;let o=[];[].forEach.call(e,e=>{let t="",n=[];switch(e.type){case"input":t=$(i).find('dl:contains("'+e.name+'")').find("dd").find("input").val();break;case"textarea":t=$(i).find('dl:contains("'+e.name+'")').find("dd").find("textarea").val();break;case"select":t=$(i).find('dl:contains("'+e.name+'")').find("dd").find("select option:selected").attr("value"),$(i).find('dl:contains("'+e.name+'")').find("dd").find("select option").each(function(){""!==$(this).attr("value")&&n.push({name:$(this).text(),value:$(this).attr("value")})});break;case"avatar":t=$(a).find(".box-content img").attr("src")}if("select"===e.type&&void 0===t||"select"===e.type&&""===t)return;let r={type:e.type,name:e.name,value:t};e.validation&&(r.validation=e.validation),n.length&&(r.options=n),o.push(r)}),t(o)})})}),setData:e=>new Promise((t,n)=>{const i=()=>{$("#forum-save").remove(),console.clear(),t(!0)};let a=document.createElement("iframe");a.id="forum-save",a.src="/profile?change_version=invision&mode=editprofile",a.width=0,a.height=0,a.onload=(()=>{let t=!1;[].forEach.call(e,e=>{switch(e.type){case"input":$("#forum-save").contents().find('dl:contains("'+e.name+'")').find("dd").find("input").first().val(e.value);break;case"textarea":$("#forum-save").contents().find('dl:contains("'+e.name+'")').find("dd").find("textarea").val(e.value);break;case"select":$("#forum-save").contents().find('dl:contains("'+e.name+'")').find("dd").find('select option[value="'+e.value+'"]').attr("selected","selected");break;case"avatar":t=e.value}}),o.onload=(()=>{t?(o.onload=(()=>{o.onload=(()=>{i()}),$("#forum-save").contents().find('input[name="avatarremoteurl"]').val(t),$("#forum-save").contents().find('input[type="submit"][value="Registrar"]').click()}),o.src="/profile?change_version=invision&mode=editprofile&page_profil=avatars"):i()}),$("#forum-save").contents().find('input[type="submit"][value="Registrar"]').click()}),document.querySelector("body > header").prepend(a);const o=document.getElementById("forum-save")})}},cache:{getData:e=>null!==localStorage.getItem(forumData.prefix+"_"+e)&&JSON.parse(localStorage.getItem(forumData.prefix+"_"+e)).content,setData:(e,t,n)=>{let i=-1===n?"undefined":(new Date).getTime();localStorage.setItem(forumData.prefix+"_"+e,JSON.stringify({cached_at:i,content:t}))},delData:e=>null!==localStorage.getItem(forumData.prefix+"_"+e)&&localStorage.removeItem(forumData.prefix+"_"+e),useData:async(e,t)=>{const n=localStorage.getItem(forumData.prefix+"_"+e),i=new Date,a=-1==t?"undefined":864e5*t;return null!=n&&-1==t||null!=n&&parseInt(JSON.parse(n).cached_at)+a>i.getTime()?JSON.parse(n).content:Promise.reject(!1)}},utility:{genSlug:(e,t)=>{const n=e=>{const t="àáäâèéëêìíïîòóöôùúüûñç·/_,:;";e=e.trim().toLowerCase();for(var n=0,i=t.length;n<i;n++)e=e.replace(new RegExp(t.charAt(n),"g"),"aaaaeeeeiiiioooouuuunc------".charAt(n));return e.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")},i=t||"_";return n(e).replace(/-/g,i)},genArray:e=>JSON.parse(e.replace(/`/g,'"')),genValidation:e=>{let t="";return[].forEach.call(e,e=>{switch(e.validation){case"hex":e.value.match(/^#[a-f0-9]{6}$/i)||(t+="<li>El campo de "+e.name.toLowerCase()+" debe incluir un código de color hexadecimal.</li>");break;case"img":e.value.match(/(jpg|jpeg|png)$/i)||(t+="<li>El campo de "+e.name.toLowerCase()+" debe ser el enlace a una imagen (formato png, jpg o jpeg).</li>")}}),t},getGroup:e=>{const t=e=>{let t="unknown";return Object.values(forumColours).map(n=>{n.hex===e.toLowerCase()&&(t=FNR.utility.genSlug(n.code))}),t},n=e=>{let t="unknown";return Object.values(forumColours).map(n=>{n.id===e&&(t=FNR.utility.genSlug(n.code))}),t};return void 0===e?"unknown":e.indexOf("#")>-1?t(e):e.indexOf("id_")>-1?n(parseFloat(e.split("_")[1])):void 0===forumColours[e]?"unknown":FNR.utility.genSlug(forumColours[e].code)}},html:{genModal:(e,t,n)=>{if(""===e||null==e)return;if(""===t||null==t)return;let i=document.createElement("div");i.id="forum-modal",document.body.appendChild(i);let a="";a+='<div id="'+FNR.utility.genSlug(e,"-")+'" class="modal-element">',a+='<div class="modal-title">',a+="<h3>"+e+"</h3>",a+='<a onclick="document.getElementById(`forum-modal`).remove()">',a+='<i class="fas fa-times"></i>',a+="</a>",a+="</div>",a+='<div class="modal-content">',a+='<div class="is-content">',a+=t.replace(/\n/g,"<br>"),a+="</div>",""!==n&&null!=n&&(a+='<div class="modal-buttons">',a+=n,a+="</div>"),a+="</div>",a+="</div>",a+='<div class="is-bgmodal bg-active" onclick="document.getElementById(`forum-modal`).remove()"></div>',document.getElementById("forum-modal").innerHTML=a},genPrompt:(e,t,n,i)=>{if(""!==e&&null!=e&&""!==t&&null!=t)return new Promise((a,o)=>{FNR.html.genModal(e,"<p>"+t+'</p><p><input id="modal-prompt" type="text" placeholder="'+n+'" value="'+i+'"></p>','<button id="modal-button-enter" class="button1 btn-main">Confirmar</button><button id="modal-button-cancel" class="button1">Cancelar</button>'),document.querySelector("#modal-button-enter").onclick=(()=>{const e=document.querySelector("#modal-prompt").value;a(""!==e&&e),document.getElementById("forum-modal").remove()}),document.querySelector("#modal-button-cancel").onclick=(()=>{o(!1),document.getElementById("forum-modal").remove()}),document.querySelector(".modal-title a").onclick=(()=>{o(!1),document.getElementById("forum-modal").remove()}),document.querySelector(".is-bgmodal.bg-active").onclick=(()=>{o(!1),document.getElementById("forum-modal").remove()})})},genNotification:(e,t,n,i)=>{if(""===e||null==e)return;if(""===t||null==t)return;if(t.length>50)return;if(""===n||null==n)return;document.querySelectorAll("forum-notification").length&&(document.getElementById("forum-notification").remove(),clearTimeout());let a=document.createElement("div");a.id="forum-notification",document.body.appendChild(a);let o="";o+=""===i||null==i?'<div id="'+FNR.utility.genSlug(e,"-")+'" class="notification-element" onclick="document.querySelector(`#forum-notification`).classList.remove(`notification-show`)" >':'<a href="'+i+'" target="_blank" id="'+FNR.utility.genSlug(e,"-")+'" class="notification-element" onclick="document.querySelector(`#forum-notification`).classList.remove(`notification-show`)" >',o+='<div class="notification-icon">',o+='<i class="'+n+'"></i>',o+="</div>",o+='<div class="notification-content">',o+="<h3>"+e+"</h3>",o+="<p>"+t+"</p>",o+="</div>",o+='<div class="notification-controls">',o+='<i class="fas fa-times"></i>',o+="</div>",o+=""===i||null==i?"</div>":"</a>",document.getElementById("forum-notification").innerHTML=o,setTimeout(()=>{document.getElementById("forum-notification").classList.add("notification-show")},250),setTimeout(()=>{document.getElementById("forum-notification").classList.remove("notification-show")},8e3),setTimeout(()=>{document.getElementById("forum-notification").remove()},1e4)}},behaviour:{genWiki:()=>{document.querySelector(".wiki-cascade")&&[].forEach.call(document.getElementsByClassName("wiki-cascade"),e=>{e.onclick=(()=>{const t=e.parentElement.parentElement;t.classList.contains("is-active")?t.classList.remove("is-active"):t.classList.add("is-active")})}),document.querySelector(".wiki-controls .router-link-active")&&[].forEach.call(document.querySelectorAll(".wiki-controls .router-link-active"),e=>{if(!e.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("wiki-index")){const t=(e,n)=>{let i=e.parentElement.parentElement;n&&(i=i.parentElement.parentElement),i.classList.add("is-active"),i.classList.add("is-selected"),i.parentElement.parentElement.parentElement.classList.contains("wiki-index")||t(i,!1)};t(e,!0)}}),document.querySelector("aside.wiki-index > .select-container > select")&&(document.querySelector("aside.wiki-index > .select-container > select").onchange=(()=>{router.push(document.querySelector("aside.wiki-index > .select-container > select").value)}))},genDropeable:()=>{document.querySelector(".is-dropeable")&&[].forEach.call(document.getElementsByClassName("is-dropeable"),e=>{e.onclick=(()=>{e.classList.contains("is-active")?e.classList.remove("is-active"):([].forEach.call(document.getElementsByClassName("is-dropeable"),e=>{e.classList.remove("is-active")}),e.classList.add("is-active"))})})}}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generic-skin",
3
- "version": "3.7.7",
3
+ "version": "3.7.8",
4
4
  "description": "Generic Forum Skin for Forumotion created by Gaylien.",
5
5
  "main": "readme.md",
6
6
  "scripts": {