From a530c0a45adf80f39b76c02b45af007feacf697d Mon Sep 17 00:00:00 2001
From: anekos
Date: Wed, 8 Dec 2010 21:35:55 +0900
Subject: :tw!resetoauth で confirm を通すようにした
---
twittperator.js | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
(limited to 'twittperator.js')
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 =
Twittperator
Twitter Client using OAuth and Streaming API
OAuth/StreamingAPI対応Twitterクライアント
- 1.10.1
+ 1.11.0
2.3
3.0
teramako
@@ -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)
--
cgit v1.2.3