CoreFiles by mySites.guru
joomla-hidden-mail.min.js1 lines, 1,342 bytes, from Joomla_4.0.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta
md5
72bab8f04d29caeb94ecf22dd8f6ff68
sha1
16c798ed12304157374625848dfbb93a231ffd1d
sha256
e64ebab801a8994eb2f92f1580629aa5e9d4f6544bb3f066e44c8007d7f50361
"use strict";window.customElements.define("joomla-hidden-mail",class extends HTMLElement{constructor(){super(),this.newElement="",this.base=""}disconnectedCallback(){this.innerHTML=""}connectedCallback(){if(this.base=`${this.getAttribute("base")}/`,"1"===this.getAttribute("is-link")?(this.newElement=document.createElement("a"),this.newElement.setAttribute("href",`mailto:${this.constructor.b64DecodeUnicode(this.getAttribute("first"))}@${this.constructor.b64DecodeUnicode(this.getAttribute("last"))}`),[].slice.call(this.attributes).forEach((a,b)=>{const{nodeName:c}=this.attributes.item(b);if(c&&-1===["is-link","is-email","first","last","text"].indexOf(c)){const{nodeValue:a}=this.attributes.item(b);this.newElement.setAttribute(c,a)}})):this.newElement=document.createElement("span"),this.getAttribute("text")){let a=this.constructor.b64DecodeUnicode(this.getAttribute("text"));a=a.replace("src=\"images/",`src="${this.base}images/`).replace("src=\"media/",`src="${this.base}media/`),this.newElement.innerHTML=a}else this.newElement.innerText=`${window.atob(this.getAttribute("first"))}@${window.atob(this.getAttribute("last"))}`;this.innerText="",this.appendChild(this.newElement)}static b64DecodeUnicode(a){return decodeURIComponent(Array.prototype.map.call(atob(a),a=>`%${`00${a.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""))}});

The same content is in 13 releases, Joomla 4.0.0-alpha7 to 4.0.0-beta7. See them all, or every version of this file.