Permalink
Browse files

added qr-code.js to create QR-Codes, stop calling charts.googleapis.com

  • Loading branch information...
alexandregz committed Jan 31, 2015
1 parent 6d2023d commit 24b52d8e2528cf59c3e5c14bdae2669c06d81cb2
Showing with 41 additions and 11 deletions.
  1. +15 −0 2FA_qr_code.js
  2. +1 −0 qrcode.min.js
  3. +11 −3 twofactor_gauthenticator.js
  4. +14 −8 twofactor_gauthenticator.php
@@ -0,0 +1,15 @@
if (window.rcmail) {
rcmail.addEventListener('init', function() {
var url_qr_code_values = 'otpauth://totp/' +$('#prefs-title').html().split(/ - /)[1]+ '?secret=' +$('#2FA_secret').get(0).value +'&issuer=RoundCube2FA';
var qrcode = new QRCode(document.getElementById("2FA_qr_code"), {
text: url_qr_code_values,
width: 200,
height: 200,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.M // like charts.googleapis.com
});
});
}
Oops, something went wrong.

0 comments on commit 24b52d8

Please sign in to comment.