aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranekos2011-07-27 17:10:59 +0900
committeranekos2011-07-27 21:04:24 +0900
commit895d97ae04e1e35ede236e2968e629285d4ab1ae (patch)
tree1a4425b7d460587f25f546935a70467e26d9972c
parentbefd790798beb9b50c63df5b002cc1fc2f2a0ea0 (diff)
downloadvimperator-plugins-895d97ae04e1e35ede236e2968e629285d4ab1ae.tar.bz2
認証時の挙動を改善
-rw-r--r--bitly.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/bitly.js b/bitly.js
index 426d242..970376f 100644
--- a/bitly.js
+++ b/bitly.js
@@ -38,7 +38,7 @@ let PLUGIN_INFO =
<name>bit.ly</name>
<description>Get short alias by bit.ly and j.mp</description>
<description lang="ja">bit.ly や j.mp で短縮URLを得る</description>
- <version>2.1.1</version>
+ <version>2.1.2</version>
<author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author>
<license>new BSD License (Please read the source code comments of this plugin)</license>
<license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license>
@@ -87,7 +87,10 @@ let PLUGIN_INFO =
function (apiKey) {
let login = LoginInfo(HostName, null, Realm, username, apiKey, '', '');
PasswordManager.addLogin(login);
- callback(login);
+ callback();
+ },
+ {
+ default: let (e = content.document.querySelector('#bitly_api_key')) (e ? e.value : '')
}
);
}
@@ -98,6 +101,7 @@ let PLUGIN_INFO =
function fixResponseText (s)
s.trim();
+ liberator.log(arguments);
function get () {
let req = new XMLHttpRequest();
req.onreadystatechange = function () {
@@ -129,7 +133,8 @@ let PLUGIN_INFO =
return get();
if (callback) {
- setupAuth(get);
+ let args = Array.slice(arguments);
+ setupAuth(function () shorten.apply(this, args));
} else {
liberator.echoerr('Not found API Key!! Try :bitly command, before use.');
}