CoreFiles by mySites.guru
snooze.min.js6 lines, 1,039 bytes, from Joomla_5.4.2-Stable-Full_Package.zip
Raw History Compare with 5.4.1
md5
b1107f90aded96b9f676f36f838f46ce
sha1
251408b8e8dd69702b786c8e9e1be1feb84b8ea3
sha256
450645c33c3006533d8d2092a490ed324cd43007b6aee6173fd46bc3290be44a
/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.eos
 * @copyright  (C) 2023 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 is not properly initialised");const url=new URL(`${Joomla.getOptions("system.paths").baseFull}index.php?option=com_ajax&group=quickicon&plugin=eos&format=json`);async function onMutatedMessagesContainer(n,s){for(const r of n){const t=Array.from(r.addedNodes);if(!t.length)continue;const o=t.filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.querySelector(".eosnotify-snooze-btn"));o.length&&(s.disconnect(),o[0].querySelector(".eosnotify-snooze-btn").addEventListener("click",()=>fetch(url,{headers:{"X-CSRF-Token":Joomla.getOptions("csrf.token")||""}}).then(e=>{e.ok&&o[0].closest("joomla-alert").close()})))}}const observer=new MutationObserver(onMutatedMessagesContainer);observer.observe(document.querySelector("#system-message-container"),{attributes:!1,childList:!0,subtree:!0});

The same content is in 56 releases, Joomla 5.4.2-rc1 to 6.3.0-alpha1. See them all, or every version of this file.