CoreFiles by mySites.guru
setup.js23 lines, 714 bytes, from Joomla_4.2.9-Stable-Full_Package.zip
Raw History Compare with 4.2.8
md5
7cbb594751930f023ded6a1a7f7795e9
sha1
610a19165035210da4fea7e8ae9c066df8328ee7
sha256
02116325c68131dc0e89d098271b6be957f2216e5f968a1f72279cd62ea357d7
/**
 * @package     Joomla.Plugin
 * @subpackage  Multifactorauth.webauthn
 *
 * @copyright   (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
((Joomla, document, qrcode) => {

  document.addEventListener('DOMContentLoaded', () => {
    const elTarget = document.getElementById('users-mfa-totp-qrcode');
    const qrData = Joomla.getOptions('plg_multifactorauth_totp.totp.qr');

    if (!elTarget || !qrData) {
      return;
    }

    const qr = qrcode(0, 'H');
    qr.addData(qrData);
    qr.make();
    elTarget.innerHTML = qr.createImgTag(4);
  }); // eslint-disable-next-line no-undef
})(Joomla, document, qrcode);

The same content is in 21 releases, Joomla 4.2.0-beta1 to 4.2.9. See them all, or every version of this file.