aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator.js
diff options
context:
space:
mode:
authoranekos2010-12-08 21:35:55 +0900
committeranekos2010-12-08 21:36:32 +0900
commita530c0a45adf80f39b76c02b45af007feacf697d (patch)
treea79c38bf1d032cf5765dd64f8c95e457b908e2a3 /twittperator.js
parentb69233e32640b480232f5624c226221ef873b777 (diff)
downloadvimperator-plugins-a530c0a45adf80f39b76c02b45af007feacf697d.tar.bz2
:tw!resetoauth で confirm を通すようにした
Diffstat (limited to 'twittperator.js')
-rw-r--r--twittperator.js31
1 files changed, 15 insertions, 16 deletions
diff --git a/twittperator.js b/twittperator.js
index 90d0876..6f7efca 100644
--- a/twittperator.js
+++ b/twittperator.js
@@ -28,7 +28,7 @@ let PLUGIN_INFO =
<name>Twittperator</name>
<description>Twitter Client using OAuth and Streaming API</description>
<description lang="ja">OAuth/StreamingAPI対応Twitterクライアント</description>
- <version>1.10.1</version>
+ <version>1.11.0</version>
<minVersion>2.3</minVersion>
<maxVersion>3.0</maxVersion>
<author mail="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author>
@@ -1815,17 +1815,11 @@ let PLUGIN_INFO =
}
}, // }}}
withProtectedUserConfirmation: function(check, actionName, action) { // {{{
- function canceled()
- Twittperator.echo("Canceled.");
-
let protectedUserName = Twittperator.isProtected(check);
if (protectedUserName) {
- commandline.input(
- protectedUserName + " is protected user! Do you really want to " + actionName + '? Input "yes" if you want. => ',
- function(s) (s === "yes" ? action : canceled)(),
- {
- onCancel: canceled
- }
+ Twittperator.confirm(
+ protectedUserName + " is protected user! Do you really want to " + actionName + '?',
+ action
);
} else {
action();
@@ -2054,12 +2048,17 @@ let PLUGIN_INFO =
command: ["resetoauth"],
description: "Reset OAuth Information",
action: function(arg) {
- Store.remove("consumerKey");
- Store.remove("consumerSecret");
- Store.remove("token");
- Store.remove("tokenSecret");
- Store.save();
- Twittperator.echo("OAuth information were reset.");
+ Twittperator.confirm(
+ 'Do you want to reset OAuth information?',
+ function () {
+ Store.remove("consumerKey");
+ Store.remove("consumerSecret");
+ Store.remove("token");
+ Store.remove("tokenSecret");
+ Store.save();
+ Twittperator.echo("OAuth information were reset.");
+ }
+ );
},
timelineCompleter: false,
completer: Completers.id(function (it) it.in_reply_to_status_id)