Your IP : 216.73.216.224


Current Path : /var/www/html/media/plg_quickicon_eos/js/
Upload File :
Current File : /var/www/html/media/plg_quickicon_eos/js/snooze.min.js

/**
 * @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});