diff options
Diffstat (limited to 'lib/bzpage.js')
-rw-r--r-- | lib/bzpage.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bzpage.js b/lib/bzpage.js index 3f0f81b..3735328 100644 --- a/lib/bzpage.js +++ b/lib/bzpage.js @@ -7,6 +7,7 @@ var passUtils = require("passwords"); var apiUtils = require("api-utils"); var simpleStorage = require("simple-storage"); var preferences = require("preferences-service"); +var prompts = require("prompts"); var Color = require("color").Color; var TriagedDistro = 13; @@ -448,8 +449,7 @@ BZPage.prototype.setConfigurationButton = function setConfigurationButton () { var prfNm = BTSPrefNS+"JSONURL"; var url = preferences.get(prfNm,""); - // FIXME don't use window.prompt, but create util.prompt instead - var reply = that.win.prompt("New location of JSON configuration file",url); + var reply = prompts.prompt("New location of JSON configuration file",url); if (reply) { preferences.set(prfNm,reply.trim()); that.win.alert("For now, you should really restart Firefox!"); @@ -712,13 +712,13 @@ BZPage.prototype.getPassword = function getPassword (login) { var pass = passUtils.getPassword(login, domain, BTSPassRealm); // pass === null means no appropriate password in the storage if (!preferences.get(prefName,false) && (pass === null)) { - var passwordText = util.getPassword(passPrompt); + var passwordText = prompts.promptPassword(passPrompt); if (passwordText && passwordText.length > 0) { passUtils.setLogin(login, passwordText, domain, BTSPassRealm); return passwordText; } else { - var switchOff = util.promptOKNoCancel(switchPrompt); + var switchOff = prompts.promptYesNoCancel(switchPrompt); if (switchOff) { preferences.set(prefName,true); } |