CoreFiles by mySites.guru
joomla-hidden-mail.min.js1 lines, 1,412 bytes, from Joomla_4.3.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.3.0-beta2
md5
82da35595b9a3e2dc20d36516ef05674
sha1
6829a5ca62409c5d92c27b7c42bad9e81b3a480a
sha256
ea828582bd90f9e145d16ca45d2db5f9d46a3f95d1a3b5c2e7038f19d32d0e97
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(((t,e)=>{const{nodeName:i}=this.attributes.item(e);if(i&&-1===["is-link","is-email","first","last","text"].indexOf(i)){const{nodeValue:t}=this.attributes.item(e);this.newElement.setAttribute(i,t)}}))):this.newElement=document.createElement("span"),this.getAttribute("text")){let t=this.constructor.b64DecodeUnicode(this.getAttribute("text"));t=t.replace('src="images/',`src="${this.base}images/`).replace('src="media/',`src="${this.base}media/`),this.newElement.innerHTML=Joomla.sanitizeHtml(t)}else this.newElement.innerText=`${window.atob(this.getAttribute("first"))}@${window.atob(this.getAttribute("last"))}`;this.removeAttribute("class"),this.removeAttribute("style"),this.innerText="",this.appendChild(this.newElement)}static b64DecodeUnicode(t){return decodeURIComponent(Array.prototype.map.call(atob(t),(t=>`%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`)).join(""))}});

The same content is in 44 releases, Joomla 4.2.6-rc1 to 5.0.0. See them all, or every version of this file.