CoreFiles by mySites.guru
stats.js27 lines, 823 bytes, from Joomla_5.4.3-Stable-Full_Package.zip
Raw History Compare with 5.4.2
md5
e81efd80835d94b942ee0e38b0339189
sha1
eb968b6c5c56509458be326c0b1939dc16f041e7
sha256
6fbe0b30efa033c58e385962e282f68104b0f9dadf193324839c2b470f3c37bc
/**
 * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 * @since      3.5.0
 */
(document => {

  // Selectors used by this script
  const resetId = 'js-pstats-reset-uid';
  const uniqueIdFieldId = 'jform_params_unique_id';
  const onReset = event => {
    event.preventDefault();
    document.getElementById(uniqueIdFieldId).value = '';
    Joomla.submitbutton('plugin.apply');
  };
  const onBoot = () => {
    // Reset the unique id
    const reset = document.getElementById(resetId);
    if (reset) {
      reset.addEventListener('click', onReset);
    }

    // Cleanup
    document.removeEventListener('DOMContentLoaded', onBoot);
  };
  document.addEventListener('DOMContentLoaded', onBoot);
})(document, Joomla);

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