diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-07-21 13:53:52 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-07-21 13:53:52 +0200 |
commit | 16aee2fb8612acd87441c83ad7513c4f4b79bd67 (patch) | |
tree | ced10e12d1e230685e58e3fb6bd747cfed96be1e /lib/prompts.js | |
parent | 3d3ee4e3f5cb10be0b858590bb464716a06a1c3b (diff) | |
download | bugzilla-triage-16aee2fb8612acd87441c83ad7513c4f4b79bd67.tar.gz |
Add a alert as a prompt to prompts library and use it.
Diffstat (limited to 'lib/prompts.js')
-rw-r--r-- | lib/prompts.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/prompts.js b/lib/prompts.js index 8f7942e..779ef8d 100644 --- a/lib/prompts.js +++ b/lib/prompts.js @@ -9,6 +9,17 @@ var {Cc,Ci} = require("chrome"); var promptTitle = "Bugzilla Triage Script"; /** + * shows the text in a simple window + * + * @return none + */ +exports.alert = function alert(msg) { + var prompts = Cc["@mozilla.org/embedcomp/prompt-service;1"] + .getService(Ci.nsIPromptService); + prompts.alert(null, promptTitle, msg); +}; + +/** * general prompts for a string method * * @return String with the password |