CoreFiles by mySites.guru
setup.js23 lines, 715 bytes, from Joomla_5.3.1-Stable-Full_Package.zip
Raw History Compare with 5.3.0
md5
d2834c0d0cb9ca436cf5d0686348cd09
sha1
f1f1e8ed31ad17f7b39baf06657aa13f1c7d411e
sha256
730663ddf009e8430bcf248fd282182a6579659fa301591653c03a4e5dd6be8c
/**
 * @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 138 releases, Joomla 4.3.0-alpha1 to 6.0.0-alpha3. See them all, or every version of this file.