CoreFiles by mySites.guru
quickicon.min.js4 lines, 896 bytes, from Joomla_5.2.2-Stable-Full_Package.zip
Raw History Compare with 5.2.1
md5
1b3300b390664c655ca25c970dc47992
sha1
c608007775031013575d9454ba29af00bdfc1a35
sha256
9e0f33f1f752de1a160eae14a99de15c9ba51311c0b8f0da5d62565db03fb1a9
/**
 * @copyright  (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */if(!Joomla)throw new Error("Joomla API was not properly initialized");document.querySelectorAll(".quickicon").forEach(t=>{const r=t.querySelector(".quickicon-amount");r&&r.dataset.url&&Joomla.request({url:r.dataset.url,method:"GET",onSuccess:n=>{let e;try{e=JSON.parse(n)}catch{t.classList.add("error")}if(Object.hasOwn(e,"data")){const a=t.querySelector(".quickicon-name"),o=document.createElement("span");t.classList.add(e.data>0?"warning":"success"),e.data.name&&a&&(o.textContent=e.data.name,a.replaceChild(o,a.firstChild)),r.textContent=`\u200E${e.data.amount}`;const s=t.querySelector(".quickicon-sr-desc");e.data.sronly&&s&&(s.textContent=e.data.sronly)}else t.classList.add("error")},onError:()=>{t.classList.add("error")}})});

The same content is in 136 releases, Joomla 5.1.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.