CoreFiles by mySites.guru
setup.js22 lines, 747 bytes, from Joomla_6.2.1-Stable-Full_Package.zip
Raw History Compare with 6.2.0
md5
fb53b0fdca1eefbe59dbb02aac6ed684
sha1
2ef015da324adc32d6fb0e933fffc685efa3ca0a
sha256
5ca26c8ee9c4c6adf9c232490eafd5cb92f6e167b6935f7dbbf6570d9e98c723
/**
 * @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, undefined, Joomla.Text._('PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_QR_ALT'));
  });
})(Joomla, document, qrcode);

The same content is in 3 releases, Joomla 6.2.1-rc1 to 6.3.0-alpha1. See them all, or every version of this file.