From 895d97ae04e1e35ede236e2968e629285d4ab1ae Mon Sep 17 00:00:00 2001
From: anekos
Date: Wed, 27 Jul 2011 17:10:59 +0900
Subject: 認証時の挙動を改善
---
bitly.js | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
(limited to 'bitly.js')
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 =
bit.ly
Get short alias by bit.ly and j.mp
bit.ly や j.mp で短縮URLを得る
- 2.1.1
+ 2.1.2
anekos
new BSD License (Please read the source code comments of this plugin)
修正BSDライセンス (ソースコードのコメントを参照してください)
@@ -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.');
}
--
cgit v1.2.3