aboutsummaryrefslogtreecommitdiffstats
path: root/bitly.js
diff options
context:
space:
mode:
authordrry2008-11-07 23:34:36 +0000
committerdrry2008-11-07 23:34:36 +0000
commit3e8d354c1199cb42298c69eff977a4b068246827 (patch)
tree8d43425adf01f704ddb60c3a5cc892df4f74aef3 /bitly.js
parent26e7a3b656e1f9853cde1f7010afa3c21ffeaae5 (diff)
downloadvimperator-plugins-3e8d354c1199cb42298c69eff977a4b068246827.tar.bz2
* cosmetic changes.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@22978 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'bitly.js')
-rw-r--r--bitly.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/bitly.js b/bitly.js
index 28fa211..08d004c 100644
--- a/bitly.js
+++ b/bitly.js
@@ -12,15 +12,15 @@
function bitly (uri, callback) {
let req = new XMLHttpRequest();
- req.onreadystatechange = function(){
+ req.onreadystatechange = function () {
if (req.readyState != 4)
return;
if (req.status == 200)
return callback && callback(req.responseText, req);
- else
- throw new Error(req.statusText)
+ else
+ throw new Error(req.statusText);
};
- req.open("GET", 'http://bit.ly/api?url=' + uri, callback);
+ req.open('GET', 'http://bit.ly/api?url=' + uri, callback);
req.send(null);
return !callback && req.responseText;
}
@@ -37,12 +37,10 @@
});
}
);
-
+
// 外から使えるように
liberator.plugins.bitly = {
- get: bitly,
+ get: bitly
};
})();
-
-