generic-skin 3.7.7 → 3.7.9
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.
- package/apps/vueChrono.js +26 -26
- package/apps/vueChrono.min.js +1 -1
- package/apps/vueDefault.js +24 -24
- package/apps/vueDefault.min.js +2 -2
- package/apps/vueMulti.js +24 -24
- package/apps/vueMulti.min.js +1 -1
- package/apps/vueRela.js +28 -28
- package/apps/vueRela.min.js +1 -1
- package/config/vueComponents.js +80 -80
- package/config/vueComponents.min.js +2 -2
- package/extensions/vueRouter.js +1 -1
- package/frameworks/FNRFramework.js +131 -131
- package/frameworks/FNRFramework.min.js +1 -1
- package/general.js +6 -6
- package/general.min.js +1 -1
- package/options/noManagers.js +15 -15
- package/options/noManagers.min.js +1 -1
- package/package.json +1 -1
- package/pages/ucp.js +14 -14
- package/pages/ucp.min.js +1 -1
|
@@ -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/general.js
CHANGED
|
@@ -609,16 +609,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
609
609
|
|
|
610
610
|
if (item.classList.contains('is-toggle')) {
|
|
611
611
|
item.onclick = () => {
|
|
612
|
-
document.querySelector('.is-clickbox[
|
|
613
|
-
document.querySelector('.is-selectbox[
|
|
612
|
+
document.querySelector('.is-clickbox[categorybox="' + category + '"][categoryid="' + id + '"]').classList.toggle('is-active');
|
|
613
|
+
document.querySelector('.is-selectbox[categorybox="' + category + '"][categoryid="' + id + '"]').classList.toggle('is-active');
|
|
614
614
|
};
|
|
615
615
|
} else {
|
|
616
616
|
item.onclick = () => {
|
|
617
|
-
document.querySelector('.is-clickbox.is-active[
|
|
618
|
-
document.querySelector('.is-clickbox[
|
|
617
|
+
document.querySelector('.is-clickbox.is-active[categorybox="' + category + '"]').classList.remove('is-active');
|
|
618
|
+
document.querySelector('.is-clickbox[categorybox="' + category + '"][categoryid="' + id + '"]').classList.add('is-active');
|
|
619
619
|
|
|
620
|
-
document.querySelector('.is-selectbox.is-active[
|
|
621
|
-
document.querySelector('.is-selectbox[
|
|
620
|
+
document.querySelector('.is-selectbox.is-active[categorybox="' + category + '"]').classList.remove('is-active');
|
|
621
|
+
document.querySelector('.is-selectbox[categorybox="' + category + '"][categoryid="' + id + '"]').classList.add('is-active');
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
624
|
});
|
package/general.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
console.log("%cSkin por %cGaylien 🏳️🌈","font-family: sans-serif; font-size: 1.5em","font-size: 1.5em; text-transform: uppercase; font-weight: 800; color: #c381b9;"),console.log("https://zatrapa-gaylien.tumblr.com/"),document.addEventListener("DOMContentLoaded",async()=>{const[e,t]=await Promise.all([FNR.user.getLevel(),FNR.user.getGroup()]);document.body.classList.add(`is-${e}`),document.body.classList.add(`is-${t}`),"guest"!==e&&document.body.classList.add(`is-user${_userdata.user_id}`)}),document.addEventListener("DOMContentLoaded",()=>{-1===_userdata.user_id&&document.querySelector(".lastpost-content")?[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{let t,o,r;e.querySelector(".color-groups")?(t=e.querySelector(".color-groups"),o=t.outerHTML.split(t.innerHTML),r=t.textContent,t.outerHTML='<strong><a href="'+FNR.user.getUrl(r)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+r+'»">'+o[0]+Vue.filter("just-name")(r)+o[1]+"</a></strong>",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+=r)):(e.querySelector(".forum-last-author").innerHTML="<strong>Invitado</strong>",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+="Invitado")),e.querySelector(".forum-last-author").outerHTML=e.querySelector(".forum-last-author > strong").outerHTML}):-1!==_userdata.user_id&&document.querySelector(".lastpost-content")&&[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{let t="<strong>Invitado</strong>";e.querySelector(".forum-last-author > strong")?(t=e.querySelector(".forum-last-author > strong > a"),t.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.textContent+"»",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+=t.textContent),t.querySelector("span").textContent=Vue.filter("just-name")(t.textContent),t="<strong>"+t.outerHTML+"</strong>",t.textContent=Vue.filter("just-name")(t.textContent)):e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+="Invitado"),e.querySelector(".forum-last-author").outerHTML=t})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".forum-last-date")&&[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{const t=e.querySelector(".forum-last-date").textContent;e.querySelector(".lastpost-link").title+=", "+t,e.querySelector(".forum-last-date").outerHTML=t,e.outerHTML=e.innerHTML})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topiclist-topics li:not(.is-not-topic)")&&[].forEach.call(document.querySelectorAll(".topiclist-topics li:not(.is-not-topic)"),e=>{const t=e.querySelector(".topiclist-topic .to-process .topic-status").textContent;t.indexOf("unread")>-1?e.classList.add("is-unread"):e.classList.add("is-read"),t.indexOf("locked")>-1?e.classList.add("is-closed"):t.indexOf("sticky")>1?e.classList.add("is-sticky"):t.indexOf("global_announce")>1?e.classList.add("is-global-announcement"):t.indexOf("announce")>1&&e.classList.add("is-announcement")})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topic-creator")&&[].forEach.call(document.querySelectorAll(".topic-creator"),e=>{e.querySelector("span")?(e.querySelector("a")?(e.querySelector("a").title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+"»",e.innerHTML="<strong>"+e.innerHTML+"</strong>"):e.innerHTML='<strong><a href="'+FNR.user.getUrl(e.textContent)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+'»">'+e.innerHTML+"</a></strong>",e.querySelector("span").innerHTML=Vue.filter("just-name")(e.textContent)):e.innerHTML="<strong>Invitado</strong>",e.outerHTML=e.innerHTML})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topic-pagination")&&[].forEach.call(document.querySelectorAll(".topic-pagination"),e=>{e.querySelector("strong")&&e.classList.remove("to-process")})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topiclist-topics li:not(.is-not-lastpost)")&&[].forEach.call(document.querySelectorAll(".topiclist-topics li:not(.is-not-lastpost)"),e=>{const t=e.querySelector(".topiclist-topic .to-process .lastpost-author"),o=e.querySelector(".topiclist-topic .to-process .lastpost-link a").href,r=e.querySelector(".topiclist-topic .to-process .lastpost-date").textContent;e.querySelector(".topic-lastpost").href=o,e.querySelector(".topic-lastpost").title="Último mensaje por "+t.textContent.trim()+", "+r,e.querySelector(".topic-lastauthor")&&(t.querySelector("span")?(t.innerHTML='<strong><a href="'+FNR.user.getUrl(t.textContent)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.textContent+'»">'+t.querySelector("span").outerHTML+"</a></strong>",t.querySelector("strong strong").textContent=Vue.filter("just-name")(t.querySelector("strong strong").textContent),e.querySelector(".topic-lastauthor").outerHTML=t.innerHTML):e.querySelector(".topic-lastauthor").outerHTML="<strong>Invitado</strong>",e.querySelector(".topic-lastauthor").outerHTML=e.querySelector(".topic-lastauthor").innerHTML),e.querySelector(".topic-lastdate")&&(e.querySelector(".topic-lastdate").outerHTML=r)})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector("#moderation")&&document.querySelector("#moderation a")?document.querySelector('a[href="#gestionar"]').href=document.querySelector("#moderation a").href:document.querySelector("#moderation")&&document.querySelector('a[href="#gestionar"]').parentElement.remove()}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".prev-post")){let e=document.querySelector("#forum-preview");""!==document.querySelectorAll(".prev-post")[0].innerHTML&&(e.querySelector(".post-content").innerHTML='<div class="is-content">'+document.querySelectorAll(".prev-post")[0].innerHTML+"</div>",e.classList.remove("to-process"))}}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".forum-otherposts")&&document.querySelector(".forum-otherposts").children.length){let e="";[].forEach.call(document.querySelector(".forum-otherposts").querySelectorAll(".post"),t=>{if(document.querySelector(".mp-main")&&document.querySelector("#forum-reply")){let o=t.querySelector(".mp-from").textContent,r=FNR.utility.getGroup("rgb_"+t.querySelector(".mp-from > span").style.color.split("rgb(")[1].split(")")[0].replace(/, /g,"_")),n=t.querySelector(".mp-date").textContent,l=t.querySelector(".is-content").innerHTML;e+='<li class="post post-mp">',e+='<section class="postlist-post usergroup-'+r+'">',e+='<ul class="post-datafields post-profile profile-sticky">',e+='<li class="datafield-user">',e+='<div class="datafield-name">Usuario</div>',e+='<strong><a href="'+FNR.user.getUrl(o)+'" target="_blank" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+o+'»">'+o+"</a></strong>",e+="</li>",e+='<li class="datafield-date">',e+='<div class="datafield-name">Fecha</div>',e+=n.indexOf("el")>-1?n.split("el ")[1]:n,e+="</li>",e+="</ul>",e+='<div class="post-content no-links">',e+='<div class="is-content">',e+=l,e+="</div>",e+="</div>",e+="</section>",e+="</li>"}else document.querySelector("#mp-body")||(t.querySelector(".post-datafields .datafield-user a > span")?(t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("rgb_"+t.querySelector(".post-datafields .datafield-user a > span").style.color.split("rgb(")[1].split(")")[0].replace(/, /g,"_"))),t.querySelector(".post-datafields .datafield-user a").title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.querySelector(".post-datafields .datafield-user a").textContent+"»",t.querySelector(".post-datafields .datafield-user a").target="_blank",""===t.querySelector(".post-datafields .datafield-user a").href&&(t.querySelector(".post-datafields .datafield-user a").href=FNR.user.getUrl(t.querySelector(".post-datafields .datafield-user a").textContent))):t.querySelector(".post-datafields .datafield-check")&&t.querySelector(".post-datafields .datafield-check").children&&1===t.querySelector(".post-datafields .datafield-check").children.length?t.querySelector(".post-datafields .datafield-check").remove():t.querySelector(".post-datafields .datafield-user a")&&""===t.querySelector(".post-datafields .datafield-user a").href&&(t.querySelector(".post-datafields .datafield-user a").outerHTML="<strong>"+t.querySelector(".post-datafields .datafield-user a").innerHTML+"</strong>",t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("null"))),"UsuarioAnonymous"===t.querySelector(".post-datafields .datafield-user").textContent&&t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("null")))}),document.querySelector(".mp-main")&&document.querySelector("#forum-reply")&&(document.querySelector(".forum-otherposts").innerHTML=e)}}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".forum-postlist .post:not(.panel)")){const e={responder_citando:{icon:"fas fa-quote-right",title:"Citar"},editar_borrar_este_mensaje:{icon:"fas fa-pencil-alt",title:"Editar"},borrar_este_mensaje:{icon:"fas fa-trash-alt",title:"Borrar"},ver_la_direccion_ip_del_autor:{icon:"fas fa-map-marker-alt",title:"Ver IP"},permalink:{icon:"fas fa-tag",title:"Enlace permanente"}};[].forEach.call(document.querySelectorAll(".forum-postlist .post"),t=>{if(t.children.length>1){let o="";[].forEach.call(t.querySelectorAll(".to-process .post-icons li a"),t=>{const r=e[FNR.utility.genSlug(t.querySelector("img").title)];o+='<li class="post-button-'+FNR.utility.genSlug(r.title,"-")+'">',o+='<a title="'+r.title+'" href="'+t.href+'" class="post-button">',o+='<i class="'+r.icon+'"></i>',forumConfig.nameMinibuttons&&(o+="<span>"+("Enlace permanente"===r.title?"Permalink":r.title)+"</span>"),o+="</a>",o+="</li>"}),t.querySelector(".post-buttons").innerHTML=o}else t.remove()})}}),document.addEventListener("DOMContentLoaded",()=>{null!==document.getElementById("forum-realreply")&&""===document.getElementById("forum-realreply").innerHTML&&document.getElementById("quickreply-section").remove()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector('img[title="Citar mensaje"]')&&[].forEach.call(document.querySelectorAll('img[title="Citar mensaje"]'),e=>{let t=e.parentElement;t.title="Citar el Mensaje",t.classList.add("dropdown-item"),t.textContent="Citar el Mensaje"}),document.querySelector('img[title="Editar mensaje"]')&&[].forEach.call(document.querySelectorAll('img[title="Editar mensaje"]'),e=>{let t=e.parentElement;t.title="Editar el Mensaje",t.classList.add("dropdown-item"),t.textContent="Editar el Mensaje"})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".mp-from")&&[].forEach.call(document.querySelectorAll(".mp-from"),e=>{const t=FNR.utility.getGroup(e.querySelector("span").style.color.replace(/, /g,"_").replace(/, /g,"_").replace(/\(/g,"_").replace(/\)/g,""));e.innerHTML='<a href="'+FNR.user.getUrl(e.textContent)+'" target="_blank" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+'»">'+e.textContent+"</a>";let o=e.parentElement;for(;!o.classList.contains("mp-main");)o=o.parentElement;o.classList.add("usergroup-"+t)})}),document.addEventListener("DOMContentLoaded",()=>{document.getElementById("breadcrumbs")&&document.getElementById("forum-breadcrumb")&&[].forEach.call(document.getElementById("breadcrumbs").children,(e,t,o)=>{let r=e.href,n=Vue.filter("mini-sanitize")(e.text),l="";r.match(/c(\d+)-/)||t+1===o.length?(r=t+1===o.length?window.location.pathname+window.location.search:"#",l+=' class="is-hidden-touch'+(t+1===o.length?"":" is-active")+'"'):r.indexOf("#profile")>-1&&(r=FNR.user.getUrl(n)),document.querySelector("#forum-breadcrumb ul").innerHTML+="<li"+l+'><a href="'+r+'" title="Ir a «'+n+'»">'+n+"</a></li>"})}),document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector("#buttons");e&&e.children.length&&[].forEach.call(document.querySelectorAll(".page-buttons"),t=>{t.insertAdjacentHTML("afterbegin",e.innerHTML),t.parentElement.classList.contains("not-show")&&t.parentElement.classList.remove("not-show")})}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector("#pagination")&&document.querySelector("#pagination").children.length){const e=document.querySelector(".pag-img .sprite-arrow_prosilver_left"),t=document.querySelector(".pag-img .sprite-arrow_prosilver_right");e&&(e.parentElement.title="Ir a la página anterior",e.parentElement.classList.add("page-action"),e.parentElement.classList.remove("pag-img"),e.parentElement.innerHTML='<i class="fas fa-chevron-left"></i>'),t&&(t.parentElement.title="Ir a la página siguiente",t.parentElement.classList.add("page-action"),t.parentElement.classList.remove("pag-img"),t.parentElement.innerHTML='<i class="fas fa-chevron-right"></i>'),[].forEach.call(document.querySelectorAll("#pagination > span > a:not(.page-action)"),e=>{e.classList.add("page-link"),e.title="Ir a la página «"+e.textContent+"»"}),document.querySelector("#pagination > span > strong").title="Página actual";const o=document.querySelector("#pagination > span").innerHTML.trim().replace(/ ... /g,'<span class="page-spacer">…</span>');[].forEach.call(document.querySelectorAll(".page-pagination"),e=>{e.insertAdjacentHTML("afterbegin",o),e.parentElement.classList.contains("not-show")&&e.parentElement.classList.remove("not-show")})}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{1!==e.classList.length&&e.classList.remove("codebox")}),document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{const t=e.querySelector("code").innerHTML.trim();e.querySelector("dt").innerHTML='Código <em>-</em> <span class="is-pointer">Copiar</span>',e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-code"></i></div>'),e.querySelector("code").remove(),e.insertAdjacentHTML("beforeend","<code>"+t+"</code>")}),document.querySelector(".spoiler")&&[].forEach.call(document.querySelectorAll(".spoiler"),e=>{e.querySelector("dt").innerHTML=e.querySelector("dt").innerHTML.slice(0,-1),e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-archive"></i></div>')}),document.querySelector(".hidecode")&&[].forEach.call(document.querySelectorAll(".hidecode"),e=>{e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-eye-slash"></i></div>')}),document.querySelector("blockquote")&&([].forEach.call(document.querySelectorAll("blockquote cite"),e=>{if(e.innerHTML=e.innerHTML.replace(/escribió:/g,""),e.querySelector("a")){const t=e.querySelector("a");t.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.title.replace(/Ver el perfil :: /g,"")+"»"}e=e.innerHTML}),[].forEach.call(document.querySelectorAll("blockquote"),e=>{e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-quote-right"></i></div>')}))}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector("#is-form")&&document.querySelector(".msg-element")){const e=document.querySelector("#is-form").innerHTML,t={method:document.querySelector(".basic-element form").method,action:document.querySelector(".basic-element form").action,name:document.querySelector(".basic-element form").name};document.querySelector("#message-section").outerHTML='<form method="'+t.method+'" action="'+t.action+'" name="'+t.name+'" id="message-section" class="basic-element">'+document.querySelector("#message-section").innerHTML+"</form>",document.querySelector("#message-section .msg-element").insertAdjacentHTML("afterend",'<div id="usereply-comand">'+e+"</div>"),document.querySelector("#is-form").remove()}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-content .post-content")&&[].forEach.call(document.querySelectorAll(".is-content .post-content"),e=>{e.classList.remove("post-content")})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".has-anchor")&&[].forEach.call(document.querySelectorAll(".has-anchor"),e=>{e.insertAdjacentHTML("afterbegin",`<a id="anchor-${e.id}" class="page-anchor"></a>`)})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".mentiontag")&&[].forEach.call(document.querySelectorAll(".mentiontag"),e=>{e.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.title.replace(/Ver el perfil :: /g,"")+"»"})}),document.addEventListener("DOMContentLoaded",()=>{[].forEach.call(document.querySelectorAll(".to-process"),e=>{e.remove()})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector("#forum-rules")&&(document.querySelector("#forum-rules").innerHTML=document.querySelector("#forum-rules").innerHTML.replace(/</g,"<").replace(/>/g,">"))}),document.addEventListener("DOMContentLoaded",()=>{if(forumConfig.skinOptions.allowCustomStyles&&document.querySelector("#forum-content .forum-custom-styles")){let e="";[].forEach.call(document.querySelectorAll("#forum-content .forum-custom-styles"),t=>{e+=t.innerHTML,t.remove()}),document.head.insertAdjacentHTML("beforeend",`<style>${e}</style>`)}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".forum-controls")&&[].forEach.call(document.querySelectorAll(".forum-controls"),e=>{let t=0;[].forEach.call(e.children,e=>{"none"!==window.getComputedStyle(e,null).display&&(t+=e.children.length)}),0===t&&!1===e.classList.contains("not-show")&&e.classList.add("not-show")})}),document.addEventListener("DOMContentLoaded",()=>{document.dispatchEvent(forumReady)}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{e.querySelector("dt span").onclick=(()=>{navigator.clipboard.writeText(e.querySelector("code").innerText),FNR.html.genNotification("¡Copiado!","Recuerda engancharlo en algún lugar.","fas fa-copy")})})}),document.addEventListener("DOMContentLoaded",()=>{[].forEach.call(document.querySelectorAll(".is-clickbox"),e=>{const t=e.dataset.categorybox,o=e.dataset.categoryid;e.classList.contains("is-toggle")?e.onclick=(()=>{document.querySelector('.is-clickbox[data-categorybox="'+t+'"][data-categoryid="'+o+'"]').classList.toggle("is-active"),document.querySelector('.is-selectbox[data-categorybox="'+t+'"][data-categoryid="'+o+'"]').classList.toggle("is-active")}):e.onclick=(()=>{document.querySelector('.is-clickbox.is-active[data-categorybox="'+t+'"]').classList.remove("is-active"),document.querySelector('.is-clickbox[data-categorybox="'+t+'"][data-categoryid="'+o+'"]').classList.add("is-active"),document.querySelector('.is-selectbox.is-active[data-categorybox="'+t+'"]').classList.remove("is-active"),document.querySelector('.is-selectbox[data-categorybox="'+t+'"][data-categoryid="'+o+'"]').classList.add("is-active")})})}),document.addEventListener("DOMContentLoaded",()=>{FNR.behaviour.genWiki()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".checkbox-click:not(.is-radio)")&&[].forEach.call(document.querySelectorAll(".checkbox-click:not(.is-radio)"),e=>{const t=e.parentElement.parentElement,o=t.querySelector(".checkbox-real input");o.checked&&t.classList.add("is-active"),e.parentElement.onclick=(()=>{t.classList.contains("is-active")?(t.classList.remove("is-active"),o.checked=!1):(t.classList.add("is-active"),o.checked=!0)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".checkbox-click.is-radio")&&[].forEach.call(document.querySelectorAll(".checkbox-click.is-radio"),e=>{const t=e.parentElement.parentElement,o=t.querySelector(".checkbox-real input");o.checked&&t.classList.add("is-active"),e.parentElement.onclick=(()=>{[].forEach.call(document.querySelectorAll('input[type="radio"][name="'+o.name+'"]'),e=>{const t=e.parentElement.parentElement.classList;t.contains("is-active")&&t.remove("is-active")}),t.classList.contains("is-active")?(t.classList.remove("is-active"),o.checked=!1):(t.classList.add("is-active"),o.checked=!0)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-input")&&[].forEach.call(document.querySelectorAll(".is-input"),e=>{e.onclick=(t=>{e.querySelector('input[type="submit"]').click()})})}),document.addEventListener("DOMContentLoaded",()=>{FNR.behaviour.genDropeable()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-tweakeable")&&document.fonts.ready.then(()=>{[].forEach.call(document.getElementsByClassName("is-tweakeable"),e=>{const t=e.offsetWidth-parseFloat(window.getComputedStyle(e,null).paddingLeft)-parseFloat(window.getComputedStyle(e,null).paddingRight)-parseFloat(window.getComputedStyle(e,null).borderLeftWidth)-parseFloat(window.getComputedStyle(e,null).borderRightWidth);if(t>0&&e.querySelector(".is-measurable").offsetWidth>0){let o=parseFloat(window.getComputedStyle(e,null).fontSize);for(;t<e.querySelector(".is-measurable").offsetWidth;)e.style.fontSize=o+"px",o--}})})}),document.addEventListener("DOMContentLoaded",()=>{document.fonts.ready.then(()=>{document.querySelector("#forum-body > .main-body").classList.remove("is-invisible")})});
|
|
1
|
+
console.log("%cSkin por %cGaylien 🏳️🌈","font-family: sans-serif; font-size: 1.5em","font-size: 1.5em; text-transform: uppercase; font-weight: 800; color: #c381b9;"),console.log("https://zatrapa-gaylien.tumblr.com/"),document.addEventListener("DOMContentLoaded",async()=>{const[e,t]=await Promise.all([FNR.user.getLevel(),FNR.user.getGroup()]);document.body.classList.add(`is-${e}`),document.body.classList.add(`is-${t}`),"guest"!==e&&document.body.classList.add(`is-user${_userdata.user_id}`)}),document.addEventListener("DOMContentLoaded",()=>{-1===_userdata.user_id&&document.querySelector(".lastpost-content")?[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{let t,o,r;e.querySelector(".color-groups")?(t=e.querySelector(".color-groups"),o=t.outerHTML.split(t.innerHTML),r=t.textContent,t.outerHTML='<strong><a href="'+FNR.user.getUrl(r)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+r+'»">'+o[0]+Vue.filter("just-name")(r)+o[1]+"</a></strong>",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+=r)):(e.querySelector(".forum-last-author").innerHTML="<strong>Invitado</strong>",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+="Invitado")),e.querySelector(".forum-last-author").outerHTML=e.querySelector(".forum-last-author > strong").outerHTML}):-1!==_userdata.user_id&&document.querySelector(".lastpost-content")&&[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{let t="<strong>Invitado</strong>";e.querySelector(".forum-last-author > strong")?(t=e.querySelector(".forum-last-author > strong > a"),t.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.textContent+"»",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+=t.textContent),t.querySelector("span").textContent=Vue.filter("just-name")(t.textContent),t="<strong>"+t.outerHTML+"</strong>",t.textContent=Vue.filter("just-name")(t.textContent)):e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+="Invitado"),e.querySelector(".forum-last-author").outerHTML=t})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".forum-last-date")&&[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{const t=e.querySelector(".forum-last-date").textContent;e.querySelector(".lastpost-link").title+=", "+t,e.querySelector(".forum-last-date").outerHTML=t,e.outerHTML=e.innerHTML})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topiclist-topics li:not(.is-not-topic)")&&[].forEach.call(document.querySelectorAll(".topiclist-topics li:not(.is-not-topic)"),e=>{const t=e.querySelector(".topiclist-topic .to-process .topic-status").textContent;t.indexOf("unread")>-1?e.classList.add("is-unread"):e.classList.add("is-read"),t.indexOf("locked")>-1?e.classList.add("is-closed"):t.indexOf("sticky")>1?e.classList.add("is-sticky"):t.indexOf("global_announce")>1?e.classList.add("is-global-announcement"):t.indexOf("announce")>1&&e.classList.add("is-announcement")})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topic-creator")&&[].forEach.call(document.querySelectorAll(".topic-creator"),e=>{e.querySelector("span")?(e.querySelector("a")?(e.querySelector("a").title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+"»",e.innerHTML="<strong>"+e.innerHTML+"</strong>"):e.innerHTML='<strong><a href="'+FNR.user.getUrl(e.textContent)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+'»">'+e.innerHTML+"</a></strong>",e.querySelector("span").innerHTML=Vue.filter("just-name")(e.textContent)):e.innerHTML="<strong>Invitado</strong>",e.outerHTML=e.innerHTML})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topic-pagination")&&[].forEach.call(document.querySelectorAll(".topic-pagination"),e=>{e.querySelector("strong")&&e.classList.remove("to-process")})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topiclist-topics li:not(.is-not-lastpost)")&&[].forEach.call(document.querySelectorAll(".topiclist-topics li:not(.is-not-lastpost)"),e=>{const t=e.querySelector(".topiclist-topic .to-process .lastpost-author"),o=e.querySelector(".topiclist-topic .to-process .lastpost-link a").href,r=e.querySelector(".topiclist-topic .to-process .lastpost-date").textContent;e.querySelector(".topic-lastpost").href=o,e.querySelector(".topic-lastpost").title="Último mensaje por "+t.textContent.trim()+", "+r,e.querySelector(".topic-lastauthor")&&(t.querySelector("span")?(t.innerHTML='<strong><a href="'+FNR.user.getUrl(t.textContent)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.textContent+'»">'+t.querySelector("span").outerHTML+"</a></strong>",t.querySelector("strong strong").textContent=Vue.filter("just-name")(t.querySelector("strong strong").textContent),e.querySelector(".topic-lastauthor").outerHTML=t.innerHTML):e.querySelector(".topic-lastauthor").outerHTML="<strong>Invitado</strong>",e.querySelector(".topic-lastauthor").outerHTML=e.querySelector(".topic-lastauthor").innerHTML),e.querySelector(".topic-lastdate")&&(e.querySelector(".topic-lastdate").outerHTML=r)})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector("#moderation")&&document.querySelector("#moderation a")?document.querySelector('a[href="#gestionar"]').href=document.querySelector("#moderation a").href:document.querySelector("#moderation")&&document.querySelector('a[href="#gestionar"]').parentElement.remove()}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".prev-post")){let e=document.querySelector("#forum-preview");""!==document.querySelectorAll(".prev-post")[0].innerHTML&&(e.querySelector(".post-content").innerHTML='<div class="is-content">'+document.querySelectorAll(".prev-post")[0].innerHTML+"</div>",e.classList.remove("to-process"))}}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".forum-otherposts")&&document.querySelector(".forum-otherposts").children.length){let e="";[].forEach.call(document.querySelector(".forum-otherposts").querySelectorAll(".post"),t=>{if(document.querySelector(".mp-main")&&document.querySelector("#forum-reply")){let o=t.querySelector(".mp-from").textContent,r=FNR.utility.getGroup("rgb_"+t.querySelector(".mp-from > span").style.color.split("rgb(")[1].split(")")[0].replace(/, /g,"_")),n=t.querySelector(".mp-date").textContent,l=t.querySelector(".is-content").innerHTML;e+='<li class="post post-mp">',e+='<section class="postlist-post usergroup-'+r+'">',e+='<ul class="post-datafields post-profile profile-sticky">',e+='<li class="datafield-user">',e+='<div class="datafield-name">Usuario</div>',e+='<strong><a href="'+FNR.user.getUrl(o)+'" target="_blank" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+o+'»">'+o+"</a></strong>",e+="</li>",e+='<li class="datafield-date">',e+='<div class="datafield-name">Fecha</div>',e+=n.indexOf("el")>-1?n.split("el ")[1]:n,e+="</li>",e+="</ul>",e+='<div class="post-content no-links">',e+='<div class="is-content">',e+=l,e+="</div>",e+="</div>",e+="</section>",e+="</li>"}else document.querySelector("#mp-body")||(t.querySelector(".post-datafields .datafield-user a > span")?(t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("rgb_"+t.querySelector(".post-datafields .datafield-user a > span").style.color.split("rgb(")[1].split(")")[0].replace(/, /g,"_"))),t.querySelector(".post-datafields .datafield-user a").title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.querySelector(".post-datafields .datafield-user a").textContent+"»",t.querySelector(".post-datafields .datafield-user a").target="_blank",""===t.querySelector(".post-datafields .datafield-user a").href&&(t.querySelector(".post-datafields .datafield-user a").href=FNR.user.getUrl(t.querySelector(".post-datafields .datafield-user a").textContent))):t.querySelector(".post-datafields .datafield-check")&&t.querySelector(".post-datafields .datafield-check").children&&1===t.querySelector(".post-datafields .datafield-check").children.length?t.querySelector(".post-datafields .datafield-check").remove():t.querySelector(".post-datafields .datafield-user a")&&""===t.querySelector(".post-datafields .datafield-user a").href&&(t.querySelector(".post-datafields .datafield-user a").outerHTML="<strong>"+t.querySelector(".post-datafields .datafield-user a").innerHTML+"</strong>",t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("null"))),"UsuarioAnonymous"===t.querySelector(".post-datafields .datafield-user").textContent&&t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("null")))}),document.querySelector(".mp-main")&&document.querySelector("#forum-reply")&&(document.querySelector(".forum-otherposts").innerHTML=e)}}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".forum-postlist .post:not(.panel)")){const e={responder_citando:{icon:"fas fa-quote-right",title:"Citar"},editar_borrar_este_mensaje:{icon:"fas fa-pencil-alt",title:"Editar"},borrar_este_mensaje:{icon:"fas fa-trash-alt",title:"Borrar"},ver_la_direccion_ip_del_autor:{icon:"fas fa-map-marker-alt",title:"Ver IP"},permalink:{icon:"fas fa-tag",title:"Enlace permanente"}};[].forEach.call(document.querySelectorAll(".forum-postlist .post"),t=>{if(t.children.length>1){let o="";[].forEach.call(t.querySelectorAll(".to-process .post-icons li a"),t=>{const r=e[FNR.utility.genSlug(t.querySelector("img").title)];o+='<li class="post-button-'+FNR.utility.genSlug(r.title,"-")+'">',o+='<a title="'+r.title+'" href="'+t.href+'" class="post-button">',o+='<i class="'+r.icon+'"></i>',forumConfig.nameMinibuttons&&(o+="<span>"+("Enlace permanente"===r.title?"Permalink":r.title)+"</span>"),o+="</a>",o+="</li>"}),t.querySelector(".post-buttons").innerHTML=o}else t.remove()})}}),document.addEventListener("DOMContentLoaded",()=>{null!==document.getElementById("forum-realreply")&&""===document.getElementById("forum-realreply").innerHTML&&document.getElementById("quickreply-section").remove()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector('img[title="Citar mensaje"]')&&[].forEach.call(document.querySelectorAll('img[title="Citar mensaje"]'),e=>{let t=e.parentElement;t.title="Citar el Mensaje",t.classList.add("dropdown-item"),t.textContent="Citar el Mensaje"}),document.querySelector('img[title="Editar mensaje"]')&&[].forEach.call(document.querySelectorAll('img[title="Editar mensaje"]'),e=>{let t=e.parentElement;t.title="Editar el Mensaje",t.classList.add("dropdown-item"),t.textContent="Editar el Mensaje"})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".mp-from")&&[].forEach.call(document.querySelectorAll(".mp-from"),e=>{const t=FNR.utility.getGroup(e.querySelector("span").style.color.replace(/, /g,"_").replace(/, /g,"_").replace(/\(/g,"_").replace(/\)/g,""));e.innerHTML='<a href="'+FNR.user.getUrl(e.textContent)+'" target="_blank" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+'»">'+e.textContent+"</a>";let o=e.parentElement;for(;!o.classList.contains("mp-main");)o=o.parentElement;o.classList.add("usergroup-"+t)})}),document.addEventListener("DOMContentLoaded",()=>{document.getElementById("breadcrumbs")&&document.getElementById("forum-breadcrumb")&&[].forEach.call(document.getElementById("breadcrumbs").children,(e,t,o)=>{let r=e.href,n=Vue.filter("mini-sanitize")(e.text),l="";r.match(/c(\d+)-/)||t+1===o.length?(r=t+1===o.length?window.location.pathname+window.location.search:"#",l+=' class="is-hidden-touch'+(t+1===o.length?"":" is-active")+'"'):r.indexOf("#profile")>-1&&(r=FNR.user.getUrl(n)),document.querySelector("#forum-breadcrumb ul").innerHTML+="<li"+l+'><a href="'+r+'" title="Ir a «'+n+'»">'+n+"</a></li>"})}),document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector("#buttons");e&&e.children.length&&[].forEach.call(document.querySelectorAll(".page-buttons"),t=>{t.insertAdjacentHTML("afterbegin",e.innerHTML),t.parentElement.classList.contains("not-show")&&t.parentElement.classList.remove("not-show")})}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector("#pagination")&&document.querySelector("#pagination").children.length){const e=document.querySelector(".pag-img .sprite-arrow_prosilver_left"),t=document.querySelector(".pag-img .sprite-arrow_prosilver_right");e&&(e.parentElement.title="Ir a la página anterior",e.parentElement.classList.add("page-action"),e.parentElement.classList.remove("pag-img"),e.parentElement.innerHTML='<i class="fas fa-chevron-left"></i>'),t&&(t.parentElement.title="Ir a la página siguiente",t.parentElement.classList.add("page-action"),t.parentElement.classList.remove("pag-img"),t.parentElement.innerHTML='<i class="fas fa-chevron-right"></i>'),[].forEach.call(document.querySelectorAll("#pagination > span > a:not(.page-action)"),e=>{e.classList.add("page-link"),e.title="Ir a la página «"+e.textContent+"»"}),document.querySelector("#pagination > span > strong").title="Página actual";const o=document.querySelector("#pagination > span").innerHTML.trim().replace(/ ... /g,'<span class="page-spacer">…</span>');[].forEach.call(document.querySelectorAll(".page-pagination"),e=>{e.insertAdjacentHTML("afterbegin",o),e.parentElement.classList.contains("not-show")&&e.parentElement.classList.remove("not-show")})}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{1!==e.classList.length&&e.classList.remove("codebox")}),document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{const t=e.querySelector("code").innerHTML.trim();e.querySelector("dt").innerHTML='Código <em>-</em> <span class="is-pointer">Copiar</span>',e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-code"></i></div>'),e.querySelector("code").remove(),e.insertAdjacentHTML("beforeend","<code>"+t+"</code>")}),document.querySelector(".spoiler")&&[].forEach.call(document.querySelectorAll(".spoiler"),e=>{e.querySelector("dt").innerHTML=e.querySelector("dt").innerHTML.slice(0,-1),e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-archive"></i></div>')}),document.querySelector(".hidecode")&&[].forEach.call(document.querySelectorAll(".hidecode"),e=>{e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-eye-slash"></i></div>')}),document.querySelector("blockquote")&&([].forEach.call(document.querySelectorAll("blockquote cite"),e=>{if(e.innerHTML=e.innerHTML.replace(/escribió:/g,""),e.querySelector("a")){const t=e.querySelector("a");t.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.title.replace(/Ver el perfil :: /g,"")+"»"}e=e.innerHTML}),[].forEach.call(document.querySelectorAll("blockquote"),e=>{e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-quote-right"></i></div>')}))}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector("#is-form")&&document.querySelector(".msg-element")){const e=document.querySelector("#is-form").innerHTML,t={method:document.querySelector(".basic-element form").method,action:document.querySelector(".basic-element form").action,name:document.querySelector(".basic-element form").name};document.querySelector("#message-section").outerHTML='<form method="'+t.method+'" action="'+t.action+'" name="'+t.name+'" id="message-section" class="basic-element">'+document.querySelector("#message-section").innerHTML+"</form>",document.querySelector("#message-section .msg-element").insertAdjacentHTML("afterend",'<div id="usereply-comand">'+e+"</div>"),document.querySelector("#is-form").remove()}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-content .post-content")&&[].forEach.call(document.querySelectorAll(".is-content .post-content"),e=>{e.classList.remove("post-content")})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".has-anchor")&&[].forEach.call(document.querySelectorAll(".has-anchor"),e=>{e.insertAdjacentHTML("afterbegin",`<a id="anchor-${e.id}" class="page-anchor"></a>`)})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".mentiontag")&&[].forEach.call(document.querySelectorAll(".mentiontag"),e=>{e.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.title.replace(/Ver el perfil :: /g,"")+"»"})}),document.addEventListener("DOMContentLoaded",()=>{[].forEach.call(document.querySelectorAll(".to-process"),e=>{e.remove()})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector("#forum-rules")&&(document.querySelector("#forum-rules").innerHTML=document.querySelector("#forum-rules").innerHTML.replace(/</g,"<").replace(/>/g,">"))}),document.addEventListener("DOMContentLoaded",()=>{if(forumConfig.skinOptions.allowCustomStyles&&document.querySelector("#forum-content .forum-custom-styles")){let e="";[].forEach.call(document.querySelectorAll("#forum-content .forum-custom-styles"),t=>{e+=t.innerHTML,t.remove()}),document.head.insertAdjacentHTML("beforeend",`<style>${e}</style>`)}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".forum-controls")&&[].forEach.call(document.querySelectorAll(".forum-controls"),e=>{let t=0;[].forEach.call(e.children,e=>{"none"!==window.getComputedStyle(e,null).display&&(t+=e.children.length)}),0===t&&!1===e.classList.contains("not-show")&&e.classList.add("not-show")})}),document.addEventListener("DOMContentLoaded",()=>{document.dispatchEvent(forumReady)}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{e.querySelector("dt span").onclick=(()=>{navigator.clipboard.writeText(e.querySelector("code").innerText),FNR.html.genNotification("¡Copiado!","Recuerda engancharlo en algún lugar.","fas fa-copy")})})}),document.addEventListener("DOMContentLoaded",()=>{[].forEach.call(document.querySelectorAll(".is-clickbox"),e=>{const t=e.dataset.categorybox,o=e.dataset.categoryid;e.classList.contains("is-toggle")?e.onclick=(()=>{document.querySelector('.is-clickbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.toggle("is-active"),document.querySelector('.is-selectbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.toggle("is-active")}):e.onclick=(()=>{document.querySelector('.is-clickbox.is-active[categorybox="'+t+'"]').classList.remove("is-active"),document.querySelector('.is-clickbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.add("is-active"),document.querySelector('.is-selectbox.is-active[categorybox="'+t+'"]').classList.remove("is-active"),document.querySelector('.is-selectbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.add("is-active")})})}),document.addEventListener("DOMContentLoaded",()=>{FNR.behaviour.genWiki()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".checkbox-click:not(.is-radio)")&&[].forEach.call(document.querySelectorAll(".checkbox-click:not(.is-radio)"),e=>{const t=e.parentElement.parentElement,o=t.querySelector(".checkbox-real input");o.checked&&t.classList.add("is-active"),e.parentElement.onclick=(()=>{t.classList.contains("is-active")?(t.classList.remove("is-active"),o.checked=!1):(t.classList.add("is-active"),o.checked=!0)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".checkbox-click.is-radio")&&[].forEach.call(document.querySelectorAll(".checkbox-click.is-radio"),e=>{const t=e.parentElement.parentElement,o=t.querySelector(".checkbox-real input");o.checked&&t.classList.add("is-active"),e.parentElement.onclick=(()=>{[].forEach.call(document.querySelectorAll('input[type="radio"][name="'+o.name+'"]'),e=>{const t=e.parentElement.parentElement.classList;t.contains("is-active")&&t.remove("is-active")}),t.classList.contains("is-active")?(t.classList.remove("is-active"),o.checked=!1):(t.classList.add("is-active"),o.checked=!0)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-input")&&[].forEach.call(document.querySelectorAll(".is-input"),e=>{e.onclick=(t=>{e.querySelector('input[type="submit"]').click()})})}),document.addEventListener("DOMContentLoaded",()=>{FNR.behaviour.genDropeable()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-tweakeable")&&document.fonts.ready.then(()=>{[].forEach.call(document.getElementsByClassName("is-tweakeable"),e=>{const t=e.offsetWidth-parseFloat(window.getComputedStyle(e,null).paddingLeft)-parseFloat(window.getComputedStyle(e,null).paddingRight)-parseFloat(window.getComputedStyle(e,null).borderLeftWidth)-parseFloat(window.getComputedStyle(e,null).borderRightWidth);if(t>0&&e.querySelector(".is-measurable").offsetWidth>0){let o=parseFloat(window.getComputedStyle(e,null).fontSize);for(;t<e.querySelector(".is-measurable").offsetWidth;)e.style.fontSize=o+"px",o--}})})}),document.addEventListener("DOMContentLoaded",()=>{document.fonts.ready.then(()=>{document.querySelector("#forum-body > .main-body").classList.remove("is-invisible")})});
|
package/options/noManagers.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
Vue.component('tema', {
|
|
2
|
-
props: ['
|
|
2
|
+
props: ['type', 'url', 'name', 'date'],
|
|
3
3
|
template: `
|
|
4
4
|
<div class="rp-list">
|
|
5
|
-
<a class="rp-element" :href="
|
|
5
|
+
<a class="rp-element" :href="url" target="_blank" :title="'Ir al tema «' + name + '»'">
|
|
6
6
|
<div class="rp-icon">
|
|
7
|
-
<template v-if="
|
|
7
|
+
<template v-if="type === 'abierto'">
|
|
8
8
|
<i class="fas fa-lock-open"></i>
|
|
9
9
|
</template>
|
|
10
|
-
<template v-else-if="
|
|
10
|
+
<template v-else-if="type === 'cerrado'">
|
|
11
11
|
<i class="fas fa-lock"></i>
|
|
12
12
|
</template>
|
|
13
|
-
<template v-else-if="
|
|
13
|
+
<template v-else-if="type === 'abandonado'">
|
|
14
14
|
<i class="fas fa-times"></i>
|
|
15
15
|
</template>
|
|
16
16
|
</div>
|
|
17
17
|
<div class="rp-content">
|
|
18
18
|
<div class="rp-name">
|
|
19
|
-
<span>{{
|
|
19
|
+
<span>{{ name }}</span>
|
|
20
20
|
<small>
|
|
21
|
-
{{
|
|
21
|
+
{{ date }} - <slot></slot>
|
|
22
22
|
</small>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
@@ -28,7 +28,7 @@ Vue.component('tema', {
|
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
Vue.component('relacion', {
|
|
31
|
-
props: ['
|
|
31
|
+
props: ['id', 'name', 'img', 'color'],
|
|
32
32
|
data() {
|
|
33
33
|
return {
|
|
34
34
|
profileName: forumConfig.profileOptions.profileName || 'perfil'
|
|
@@ -36,20 +36,20 @@ Vue.component('relacion', {
|
|
|
36
36
|
},
|
|
37
37
|
computed: {
|
|
38
38
|
relaClass() {
|
|
39
|
-
return 'rela-list usergroup-' + this.
|
|
39
|
+
return 'rela-list usergroup-' + this.color.toLowerCase();
|
|
40
40
|
},
|
|
41
41
|
relaType() {
|
|
42
|
-
return typeof this.
|
|
42
|
+
return typeof this.id !== 'undefined';
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
template: `
|
|
46
46
|
<div :class="relaClass">
|
|
47
47
|
<template v-if="relaType">
|
|
48
|
-
<a class="rela-element" :href="'/u' +
|
|
49
|
-
<div class="rela-image" :style="'background-image: url(' +
|
|
48
|
+
<a class="rela-element" :href="'/u' + id" target="_blank" :title="'Ir al ' + profileName + ' de «' + name + '»'">
|
|
49
|
+
<div class="rela-image" :style="'background-image: url(' + img + ')'"></div>
|
|
50
50
|
<div class="rela-content">
|
|
51
51
|
<div class="rela-title">
|
|
52
|
-
<h4>{{
|
|
52
|
+
<h4>{{ name }}</h4>
|
|
53
53
|
</div>
|
|
54
54
|
<div class="small-text is-content">
|
|
55
55
|
<slot></slot>
|
|
@@ -59,10 +59,10 @@ Vue.component('relacion', {
|
|
|
59
59
|
</template>
|
|
60
60
|
<template v-else>
|
|
61
61
|
<a class="rela-element">
|
|
62
|
-
<div class="rela-image" :style="'background-image: url(' +
|
|
62
|
+
<div class="rela-image" :style="'background-image: url(' + img + ')'"></div>
|
|
63
63
|
<div class="rela-content">
|
|
64
64
|
<div class="rela-title">
|
|
65
|
-
<h4>{{
|
|
65
|
+
<h4>{{ name }}</h4>
|
|
66
66
|
</div>
|
|
67
67
|
<div class="small-text is-content">
|
|
68
68
|
<slot></slot>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Vue.component("tema",
|
|
1
|
+
Vue.component("tema",{props:["type","url","name","date"],template:'\n <div class="rp-list">\n <a class="rp-element" :href="url" target="_blank" :title="\'Ir al tema «\' + name + \'»\'">\n <div class="rp-icon">\n <template v-if="type === \'abierto\'">\n <i class="fas fa-lock-open"></i>\n </template>\n <template v-else-if="type === \'cerrado\'">\n <i class="fas fa-lock"></i>\n </template>\n <template v-else-if="type === \'abandonado\'">\n <i class="fas fa-times"></i>\n </template>\n </div>\n <div class="rp-content">\n <div class="rp-name">\n <span>{{ name }}</span>\n <small>\n {{ date }} - <slot></slot>\n </small>\n </div>\n </div>\n </a>\n </div>\n '}),Vue.component("relacion",{props:["id","name","img","color"],data:()=>({profileName:forumConfig.profileOptions.profileName||"perfil"}),computed:{relaClass(){return"rela-list usergroup-"+this.color.toLowerCase()},relaType(){return void 0!==this.id}},template:'\n <div :class="relaClass">\n <template v-if="relaType">\n <a class="rela-element" :href="\'/u\' + id" target="_blank" :title="\'Ir al \' + profileName + \' de «\' + name + \'»\'">\n <div class="rela-image" :style="\'background-image: url(\' + img + \')\'"></div>\n <div class="rela-content">\n <div class="rela-title">\n <h4>{{ name }}</h4>\n </div>\n <div class="small-text is-content">\n <slot></slot>\n </div>\n </div>\n </a>\n </template>\n <template v-else>\n <a class="rela-element">\n <div class="rela-image" :style="\'background-image: url(\' + img + \')\'"></div>\n <div class="rela-content">\n <div class="rela-title">\n <h4>{{ name }}</h4>\n </div>\n <div class="small-text is-content">\n <slot></slot>\n </div>\n </div>\n </a>\n </template>\n </div>\n '});
|
package/package.json
CHANGED
package/pages/ucp.js
CHANGED
|
@@ -21,8 +21,8 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
21
21
|
component: {
|
|
22
22
|
page_name: 'Editar perfil',
|
|
23
23
|
template: `
|
|
24
|
-
<wiki-contenido
|
|
25
|
-
<panel-control
|
|
24
|
+
<wiki-contenido mode="app">
|
|
25
|
+
<panel-control elements="` + JSON.stringify(forumConfig.profileEdit).replace(/"/g, "'") + `" />
|
|
26
26
|
</wiki-contenido>
|
|
27
27
|
`
|
|
28
28
|
}
|
|
@@ -34,7 +34,7 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
34
34
|
component: {
|
|
35
35
|
page_name: 'Multicuentas',
|
|
36
36
|
template: `
|
|
37
|
-
<wiki-contenido
|
|
37
|
+
<wiki-contenido mode="app">
|
|
38
38
|
<gestor-multicuentas />
|
|
39
39
|
</wiki-contenido>
|
|
40
40
|
`
|
|
@@ -47,7 +47,7 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
47
47
|
component: {
|
|
48
48
|
page_name: 'Supervisados',
|
|
49
49
|
template: `
|
|
50
|
-
<wiki-contenido
|
|
50
|
+
<wiki-contenido mode="app">
|
|
51
51
|
<lista-seguidos />
|
|
52
52
|
</wiki-contenido>
|
|
53
53
|
`
|
|
@@ -59,7 +59,7 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
59
59
|
component: {
|
|
60
60
|
page_name: 'Bosquejos',
|
|
61
61
|
template: `
|
|
62
|
-
<wiki-contenido
|
|
62
|
+
<wiki-contenido mode="app">
|
|
63
63
|
<lista-bosquejos />
|
|
64
64
|
</wiki-contenido>
|
|
65
65
|
`
|
|
@@ -86,8 +86,8 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
86
86
|
page_name: 'Editar',
|
|
87
87
|
page_parent: 'Perfil de usuario',
|
|
88
88
|
template: `
|
|
89
|
-
<wiki-contenido
|
|
90
|
-
<panel-control
|
|
89
|
+
<wiki-contenido mode="app">
|
|
90
|
+
<panel-control elements="` + JSON.stringify(forumConfig.profileEdit).replace(/"/g, "'") + `" />
|
|
91
91
|
</wiki-contenido>
|
|
92
92
|
`
|
|
93
93
|
}
|
|
@@ -99,7 +99,7 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
99
99
|
page_name: 'Multicuentas',
|
|
100
100
|
page_parent: 'Perfil de usuario',
|
|
101
101
|
template: `
|
|
102
|
-
<wiki-contenido
|
|
102
|
+
<wiki-contenido mode="app">
|
|
103
103
|
<gestor-multicuentas />
|
|
104
104
|
</wiki-contenido>
|
|
105
105
|
`
|
|
@@ -116,8 +116,8 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
116
116
|
component: {
|
|
117
117
|
page_name: 'Editar perfil',
|
|
118
118
|
template: `
|
|
119
|
-
<wiki-contenido
|
|
120
|
-
<panel-control
|
|
119
|
+
<wiki-contenido mode="app">
|
|
120
|
+
<panel-control elements="` + JSON.stringify(forumConfig.profileEdit).replace(/"/g, "'") + `" />
|
|
121
121
|
</wiki-contenido>
|
|
122
122
|
`
|
|
123
123
|
}
|
|
@@ -139,7 +139,7 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
139
139
|
page_name: 'Cronología',
|
|
140
140
|
page_parent: 'Otros',
|
|
141
141
|
template: `
|
|
142
|
-
<wiki-contenido
|
|
142
|
+
<wiki-contenido mode="app">
|
|
143
143
|
<gestor-cronologia />
|
|
144
144
|
</wiki-contenido>
|
|
145
145
|
`
|
|
@@ -154,7 +154,7 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
154
154
|
page_name: 'Relaciones',
|
|
155
155
|
page_parent: 'Otros',
|
|
156
156
|
template: `
|
|
157
|
-
<wiki-contenido
|
|
157
|
+
<wiki-contenido mode="app">
|
|
158
158
|
<gestor-relaciones />
|
|
159
159
|
</wiki-contenido>
|
|
160
160
|
`
|
|
@@ -168,7 +168,7 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
168
168
|
page_name: 'Supervisados',
|
|
169
169
|
page_parent: 'Otros',
|
|
170
170
|
template: `
|
|
171
|
-
<wiki-contenido
|
|
171
|
+
<wiki-contenido mode="app">
|
|
172
172
|
<lista-seguidos />
|
|
173
173
|
</wiki-contenido>
|
|
174
174
|
`
|
|
@@ -181,7 +181,7 @@ if (typeof forumConfig.profileUser.cronoField === 'undefined' && typeof forumCon
|
|
|
181
181
|
page_name: 'Bosquejos',
|
|
182
182
|
page_parent: 'Otros',
|
|
183
183
|
template: `
|
|
184
|
-
<wiki-contenido
|
|
184
|
+
<wiki-contenido mode="app">
|
|
185
185
|
<lista-bosquejos />
|
|
186
186
|
</wiki-contenido>
|
|
187
187
|
`
|
package/pages/ucp.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
_userdata.session_logged_in||window.location.replace("/");const routes=[{path:"/",redirect:"/inicio"},{path:"/home",redirect:"/inicio"}];void 0===forumConfig.profileUser.cronoField&&void 0===forumConfig.profileUser.relaField?(routes.push({path:"/inicio",redirect:"/editar"}),routes.push({path:"/editar",component:{page_name:"Editar perfil",template:'\n<wiki-contenido
|
|
1
|
+
_userdata.session_logged_in||window.location.replace("/");const routes=[{path:"/",redirect:"/inicio"},{path:"/home",redirect:"/inicio"}];void 0===forumConfig.profileUser.cronoField&&void 0===forumConfig.profileUser.relaField?(routes.push({path:"/inicio",redirect:"/editar"}),routes.push({path:"/editar",component:{page_name:"Editar perfil",template:'\n<wiki-contenido mode="app">\n <panel-control elements="'+JSON.stringify(forumConfig.profileEdit).replace(/"/g,"'")+'" />\n</wiki-contenido>\n '}}),void 0!==forumConfig.profileUser.accountsField&&routes.push({path:"/multicuentas",component:{page_name:"Multicuentas",template:'\n<wiki-contenido mode="app">\n <gestor-multicuentas />\n</wiki-contenido>\n '}}),routes.push({path:"/supervisados",component:{page_name:"Supervisados",template:'\n<wiki-contenido mode="app">\n <lista-seguidos />\n</wiki-contenido>\n '}}),routes.push({path:"/bosquejos",component:{page_name:"Bosquejos",template:'\n<wiki-contenido mode="app">\n <lista-bosquejos />\n</wiki-contenido>\n '}})):(void 0!==forumConfig.profileUser.accountsField?(routes.push({path:"/inicio",redirect:"/perfil/editar"}),routes.push({path:"/perfil",redirect:"/inicio",component:{page_name:"Perfil de usuario"}}),routes.push({path:"/perfil/editar",component:{page_name:"Editar",page_parent:"Perfil de usuario",template:'\n<wiki-contenido mode="app">\n <panel-control elements="'+JSON.stringify(forumConfig.profileEdit).replace(/"/g,"'")+'" />\n</wiki-contenido>\n '}}),routes.push({path:"/perfil/multicuentas",component:{page_name:"Multicuentas",page_parent:"Perfil de usuario",template:'\n <wiki-contenido mode="app">\n <gestor-multicuentas />\n </wiki-contenido>\n '}})):(routes.push({path:"/inicio",redirect:"/editar"}),routes.push({path:"/editar",component:{page_name:"Editar perfil",template:'\n<wiki-contenido mode="app">\n <panel-control elements="'+JSON.stringify(forumConfig.profileEdit).replace(/"/g,"'")+'" />\n</wiki-contenido>\n '}})),routes.push({path:"/otros",redirect:"/inicio",component:{page_name:"Otros"}}),void 0!==forumConfig.profileUser.cronoField&&routes.push({path:"/otros/cronologia",component:{page_name:"Cronología",page_parent:"Otros",template:'\n<wiki-contenido mode="app">\n <gestor-cronologia />\n</wiki-contenido>\n '}}),void 0!==forumConfig.profileUser.relaField&&routes.push({path:"/otros/relaciones",component:{page_name:"Relaciones",page_parent:"Otros",template:'\n<wiki-contenido mode="app">\n <gestor-relaciones />\n</wiki-contenido>\n '}}),routes.push({path:"/otros/supervisados",component:{page_name:"Supervisados",page_parent:"Otros",template:'\n<wiki-contenido mode="app">\n <lista-seguidos />\n</wiki-contenido>\n '}}),routes.push({path:"/otros/bosquejos",component:{page_name:"Bosquejos",page_parent:"Otros",template:'\n<wiki-contenido mode="app">\n <lista-bosquejos />\n</wiki-contenido>\n '},alias:"/bosquejos"}),routes.push({path:"/bosquejos",redirect:"/otros/bosquejos"}),routes.push({path:"/supervisados",redirect:"/otros/supervisados"}));const router=new VueRouter({routes:routes});
|