diff options
author | anekos | 2010-12-08 21:29:30 +0900 |
---|---|---|
committer | anekos | 2010-12-08 21:36:31 +0900 |
commit | b69233e32640b480232f5624c226221ef873b777 (patch) | |
tree | 0ac32479b116c838048444eec307ec15ce623075 /twittperator.js | |
parent | 0099079328c5a4cd363e295a79e870701d740142 (diff) | |
download | vimperator-plugins-b69233e32640b480232f5624c226221ef873b777.tar.bz2 |
Twittperator.confirm 追加
Diffstat (limited to 'twittperator.js')
-rw-r--r-- | twittperator.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/twittperator.js b/twittperator.js index 411905b..90d0876 100644 --- a/twittperator.js +++ b/twittperator.js @@ -1592,6 +1592,18 @@ let PLUGIN_INFO = }, // }}} }; // }}} let Twittperator = { // {{{ + confirm: function(msg, onYes, onNo, onCancel) { + if (!onNo) + onNo = function () Twittperator.echo('canceled.'); + + commandline.input( + msg + " (input 'yes/no'): ", + function(s) (s === "yes" ? onYes : onNo)(), + { + onCancel: onCancel || onNo + } + ); + }, echo: function(msg) { // {{{ liberator.echo("[Twittperator] " + msg); }, // }}} |