CoreFiles by mySites.guru
setup.js22 lines, 676 bytes, from Joomla_5.4.7-Stable-Full_Package.zip
Raw History Compare with 5.4.6
md5
b6f35301d06d210392157871d9f1616d
sha1
b32580fd5e3d5c0418160876c11524872d7e3e5e
sha256
637a9b5048fc976101e772ab4f8fb9fedc73f64c85c81291a01faa5f544da9ae
/**
 * @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);
  });
})(Joomla, document, qrcode);

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