



function showQr() {
  if(!bundle|| !bundle.token) {
    console.log(bundle);
    document.getElementById('qrPlaceholder').innerHTML = 'Whoops! Something is not OK. Reinstall plugin or contact support.'
    return;  
  }
  
  var typeNumber = 0
  var errorCorrectionLevel = 'L'
  var qr = qrcode(typeNumber, errorCorrectionLevel)
  qr.addData(bundle.token)
  qr.make()
  document.getElementById('qrPlaceholder').innerHTML = qr.createImgTag(4, 4)
}

jQuery(document).ready(function() {
  showQr()
  document.getElementById('logoImg').setAttribute('src', bundle.pluginUrl + '/img/logo_withBG.png');
  document.getElementById('arrowImg').setAttribute('src', bundle.pluginUrl + '/img/arrow.png');
})