From 81c4de969c1a9907489edcc4f40eac92ff066f19 Mon Sep 17 00:00:00 2001 From: Reza Tavakoli Date: Sat, 30 Jan 2016 01:16:44 +0330 Subject: [PATCH] Added support for Steam authentication --- javascript/popup.js | 2 +- totp/totp.js | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/javascript/popup.js b/javascript/popup.js index f74e682..6f11851 100644 --- a/javascript/popup.js +++ b/javascript/popup.js @@ -774,7 +774,7 @@ function copyCode() { document.getElementById('passphrase').style.opacity = 1; }, 200); return; - } else if (!/^\d+$/.test(code)) { + } else if (!/^[0-9A-Z]+$/.test(code)) { return; } chrome.permissions.request({ diff --git a/totp/totp.js b/totp/totp.js index 346445e..ff5853d 100644 --- a/totp/totp.js +++ b/totp/totp.js @@ -39,9 +39,26 @@ var KeyUtilities = function() { return str; }; + var base26 = function(num) { + chars = '23456789BCDFGHJKMNPQRTVWXY'; + output = ''; + len = 5; + for(i=0;i