aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--atnd.js8
-rw-r--r--hatebuWatchDog.js4
-rw-r--r--multi_requester.js12
-rw-r--r--nextlink.js6
-rw-r--r--notifier.js8
-rw-r--r--pino.js8
-rw-r--r--readitlater.js24
-rw-r--r--subscldr.js6
-rw-r--r--tada.js16
-rw-r--r--vimp_to_android_phone.js4
10 files changed, 48 insertions, 48 deletions
diff --git a/atnd.js b/atnd.js
index 78ede2b..86d802f 100644
--- a/atnd.js
+++ b/atnd.js
@@ -68,7 +68,7 @@ let INFO =
}
);
- req.addEventListener("onSuccess",function(data){
+ req.addEventListener("success",function(data){
let res = libly.$U.evalJson(data.responseText);
if(res.results_returned == 0){
liberator.echo("keyword: " + keyword + " was no result");
@@ -104,7 +104,7 @@ let INFO =
}
});
- req.addEventListener("onFailure",function(data){
+ req.addEventListener("failure",function(data){
liberator.echoerr(data.statusText);
});
@@ -124,7 +124,7 @@ let INFO =
asynchronous:true,
}
);
- req.addEventListener("onSuccess",function(data){
+ req.addEventListener("success",function(data){
let res = libly.$U.evalJson(data.responseText);
if(res.results_returned == 0){
return ;
@@ -144,7 +144,7 @@ let INFO =
}
});
- req.addEventListener("onFailure",function(data){
+ req.addEventListener("failure",function(data){
context.incomplete = false;
liberator.echoerr(data.statusText);
});
diff --git a/hatebuWatchDog.js b/hatebuWatchDog.js
index 476cbf4..0a683e4 100644
--- a/hatebuWatchDog.js
+++ b/hatebuWatchDog.js
@@ -119,13 +119,13 @@ let publics = plugins.hatebuWatchDog = (function() {
);
let currentValue;
- req.addEventListener("onSuccess", function(data) {
+ req.addEventListener("success", function(data) {
liberator.log("XML-RPC request was succeeded.");
let resXml = new XML(data.responseText.replace(/^<\?xml version[^>]+?>/, ''));
currentValue = window.eval(resXml..int.toString());
onSuccess(currentValue);
});
- req.addEventListener("onFailure", function(data) {
+ req.addEventListener("failure", function(data) {
onFailure();
});
liberator.log("reauest...");
diff --git a/multi_requester.js b/multi_requester.js
index 305006f..1165edf 100644
--- a/multi_requester.js
+++ b/multi_requester.js
@@ -332,9 +332,9 @@ var MultiRequester = {
count: count
}
});
- req.addEventListener("onException", $U.bind(this, this.onException));
- req.addEventListener("onSuccess", $U.bind(this, this.onSuccess));
- req.addEventListener("onFailure", $U.bind(this, this.onFailure));
+ req.addEventListener("exception", $U.bind(this, this.onException));
+ req.addEventListener("success", $U.bind(this, this.onSuccess));
+ req.addEventListener("failure", $U.bind(this, this.onFailure));
req.get();
MultiRequester.requestCount++;
}
@@ -394,9 +394,9 @@ var MultiRequester = {
if (!el) throw "extract link failed.: extractLink -> " + extractLink;
var url = $U.pathToURL(el[0], res.req.url);
var req = new libly.Request(url, null, $U.extend(res.req.options, { extractLink: true }));
- req.addEventListener("onException", $U.bind(this, this.onException));
- req.addEventListener("onSuccess", $U.bind(this, this.onSuccess));
- req.addEventListener("onFailure", $U.bind(this, this.onFailure));
+ req.addEventListener("exception", $U.bind(this, this.onException));
+ req.addEventListener("success", $U.bind(this, this.onSuccess));
+ req.addEventListener("failure", $U.bind(this, this.onFailure));
req.get();
MultiRequester.requestCount++;
MultiRequester.doProcess = true;
diff --git a/nextlink.js b/nextlink.js
index 9149966..e96ea1c 100644
--- a/nextlink.js
+++ b/nextlink.js
@@ -264,9 +264,9 @@ Autopager.prototype = {
return true;
}
- req.addEventListener("onSuccess", $U.bind(this, this.onSuccess));
- req.addEventListener("onFailure", $U.bind(this, this.onFailure));
- req.addEventListener("onException", $U.bind(this, this.onFailure));
+ req.addEventListener("success", $U.bind(this, this.onSuccess));
+ req.addEventListener("failure", $U.bind(this, this.onFailure));
+ req.addEventListener("exception", $U.bind(this, this.onFailure));
req.get();
},
onSuccess: function(res) {
diff --git a/notifier.js b/notifier.js
index 07784eb..cb78c9d 100644
--- a/notifier.js
+++ b/notifier.js
@@ -255,14 +255,14 @@ function bootstrap() {
this.options.headers,
$U.extend({ asynchronous: true }, this.options.extra)
);
- req.addEventListener("onSuccess", $U.bind(this, function(res) {
+ req.addEventListener("success", $U.bind(this, function(res) {
logger.log("initialized");
if (typeof this.parse == "function") this.cache = this.parse(res);
if (this.cache)
this.initialized = true;
}));
- req.addEventListener("onFailure", function(res) { logger.log(res); });
- req.addEventListener("onException", function(res) { logger.log(res); });
+ req.addEventListener("failure", function(res) { logger.log(res); });
+ req.addEventListener("exception", function(res) { logger.log(res); });
if (this.method == "POST")
req.post();
else
@@ -277,7 +277,7 @@ function bootstrap() {
this.options.headers,
$U.extend({ asynchronous: true }, this.options.extra)
);
- req.addEventListener("onSuccess", $U.bind(this, function(res) {
+ req.addEventListener("success", $U.bind(this, function(res) {
var parsed, diff;
if (typeof this.parse == "function") parsed = this.parse(res);
if (parsed && typeof this.diff == "function") diff = this.diff(this.cache, parsed);
diff --git a/pino.js b/pino.js
index 375a55f..ca8cd47 100644
--- a/pino.js
+++ b/pino.js
@@ -259,10 +259,10 @@ let self = liberator.plugins.pino = (function() {
}
);
- request.addEventListener("onSuccess", function(data) {
+ request.addEventListener("success", function(data) {
liberator.log("Removed pin from '" + link + "' was succeeded.");
});
- request.addEventListener("onFailure", function(data) {
+ request.addEventListener("failure", function(data) {
liberator.echoerr("Cannot remove pin");
});
request.post();
@@ -279,14 +279,14 @@ let self = liberator.plugins.pino = (function() {
}
);
- request.addEventListener("onSuccess", function(data) {
+ request.addEventListener("success", function(data) {
if (isLoginPage(data)) {
liberator.echoerr("Can't get pinned list. Maybe you should login to livedoor.");
return;
}
result = unentifyObjectValues(liberator.eval(data.responseText));
});
- request.addEventListener("onFailure", function(data) {
+ request.addEventListener("failure", function(data) {
liberator.echoerr("Can't get pinned list!!!");
});
request.post();
diff --git a/readitlater.js b/readitlater.js
index b6c20aa..8d87fb7 100644
--- a/readitlater.js
+++ b/readitlater.js
@@ -215,11 +215,11 @@ let PLUGIN_INFO =
);
- req.addEventListener("onSuccess",function(data){
+ req.addEventListener("success",function(data){
e(data.responseText)
});
- req.addEventListener("onFailure",function(data){
+ req.addEventListener("failure",function(data){
liberator.echoerr(data.statusText);
liberator.echoerr(data.responseText);
});
@@ -255,8 +255,8 @@ let PLUGIN_INFO =
);
- req.addEventListener("onSuccess",function(data) callback(libly.$U.evalJson(data.responseText)));
- req.addEventListener("onFailure",function(data){
+ req.addEventListener("success",function(data) callback(libly.$U.evalJson(data.responseText)));
+ req.addEventListener("failure",function(data){
liberator.echoerr(data.statusText);
liberator.echoerr(data.responseText);
});
@@ -286,9 +286,9 @@ let PLUGIN_INFO =
}
);
- req.addEventListener("onSuccess",callback);
+ req.addEventListener("success",callback);
- req.addEventListener("onFailure",function(data){
+ req.addEventListener("failure",function(data){
liberator.echoerr(data.statusText);
liberator.echoerr(data.responseText);
});
@@ -328,9 +328,9 @@ let PLUGIN_INFO =
);
var ref = this;
- req.addEventListener("onSuccess",callback);
+ req.addEventListener("success",callback);
- req.addEventListener("onFailure",function(data){
+ req.addEventListener("failure",function(data){
liberator.echoerr(data.statusText);
liberator.echoerr(data.responseText);
});
@@ -361,7 +361,7 @@ let PLUGIN_INFO =
);
- req.addEventListener("onSuccess",function(data){
+ req.addEventListener("success",function(data){
let res = libly.$U.evalJson(data.responseText);
liberator.echo(
<style type="text/css"><![CDATA[
@@ -377,7 +377,7 @@ let PLUGIN_INFO =
);
});
- req.addEventListener("onFailure",function(data){
+ req.addEventListener("failure",function(data){
liberator.echoerr(data.statusText);
liberator.echoerr(data.responseText);
});
@@ -402,7 +402,7 @@ let PLUGIN_INFO =
);
- req.addEventListener("onSuccess",function(data){
+ req.addEventListener("success",function(data){
liberator.echo(
<div>
X-Limit-User-Limit : {data.transport.getResponseHeader("X-Limit-User-Limit")} <br />
@@ -416,7 +416,7 @@ let PLUGIN_INFO =
);
});
- req.addEventListener("onFailure",function(data){
+ req.addEventListener("failure",function(data){
liberator.echoerr(data.statusText);
liberator.echoerr(data.responseText);
});
diff --git a/subscldr.js b/subscldr.js
index 7d8bfad..cfdb2a0 100644
--- a/subscldr.js
+++ b/subscldr.js
@@ -128,7 +128,7 @@ liberator.plugins.subscldr = (function() {
var uri = target || endpoint + buffer.URL;
var req = new libly.Request(uri, null, {asynchronous: false});
- req.addEventListener("onSuccess", function(res) {
+ req.addEventListener("success", function(res) {
liberator.log(res.responseText);
res.getHTMLDocument();
if (isLoginForm(res.doc)) throw "Please login to LDR to subscribe the feed.";
@@ -160,11 +160,11 @@ liberator.plugins.subscldr = (function() {
postBody: postBody
}
);
- req.addEventListener("onSuccess", function(data) {
+ req.addEventListener("success", function(data) {
liberator.log("Post status: " + data.responseText);
liberator.echo("Subscribe feed succeed.");
});
- req.addEventListener("onFailure", function(data) {
+ req.addEventListener("failure", function(data) {
liberator.log("POST FAILURE: " + data.responseText);
liberator.echoerr("POST FAILURE: " + data.statusText);
});
diff --git a/tada.js b/tada.js
index 96e89e5..b1a9cf9 100644
--- a/tada.js
+++ b/tada.js
@@ -260,7 +260,7 @@ liberator.plugins.tada = (function(){
let result = [];
var req = new libly.Request(getURI(), null, {asynchronous: false});
- req.addEventListener('onSuccess', function(data) {
+ req.addEventListener('success', function(data) {
liberator.log("success");
data.getHTMLDocument("//div[@id='Container']/div[2]/div/div/ul/li/a").forEach(function(item){
var left = $LX("../span/strong[text()]", item);
@@ -291,7 +291,7 @@ liberator.plugins.tada = (function(){
let result = [];
var req = new libly.Request(getURI() + listId.toString(), null, {asynchronous: false});
- req.addEventListener('onSuccess', function(res) {
+ req.addEventListener('success', function(res) {
liberator.log("success");
res.getHTMLDocument("//ul[@id='incomplete_items']/li/form").forEach(function(item) {
result.push({
@@ -315,12 +315,12 @@ liberator.plugins.tada = (function(){
}
);
- req.addEventListener('onSuccess', function(data) {
+ req.addEventListener('success', function(data) {
liberator.echo("Posted[" + listName + "]:" + content);
liberator.plugins.posted = data;
});
- req.addEventListener('onFailure', function(data) {
+ req.addEventListener('failure', function(data) {
liberator.echoerr("POST FAILURE: " + content);
});
@@ -332,10 +332,10 @@ liberator.plugins.tada = (function(){
liberator.log("endpoint:" + endpoint);
var req = new libly.Request(endpoint, null, {postBody: "dummy=hoge"});
- req.addEventListener('onSuccess', function(data) {
+ req.addEventListener('success', function(data) {
liberator.echo("Send Ta-Da list '" + listName + "' to your email address.");
});
- req.addEventListener('onFailure', function(data) {
+ req.addEventListener('failure', function(data) {
liberator.echoerr("EMAIL SENDING ERROR.");
liberator.log(data.responseText);
});
@@ -354,10 +354,10 @@ liberator.plugins.tada = (function(){
})
}
);
- req.addEventListener('onSuccess', function(data) {
+ req.addEventListener('success', function(data) {
liberator.echo("Done: " + itemId);
});
- req.addEventListener('onFailure', function(data) {
+ req.addEventListener('failure', function(data) {
liberator.echoerr("Done item failed.");
liberator.log(data.responseText);
});
diff --git a/vimp_to_android_phone.js b/vimp_to_android_phone.js
index 3b4821a..f428f59 100644
--- a/vimp_to_android_phone.js
+++ b/vimp_to_android_phone.js
@@ -32,7 +32,7 @@ var sendToPhone = function(requestURL) {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Extension': 'true'
});
- req.addEventListener('onSuccess', function(res) {
+ req.addEventListener('success', function(res) {
var body = res.responseText;
if (body.substring(0, 2) == 'OK') {
liberator.echo('Send to phone successed.');
@@ -44,7 +44,7 @@ var sendToPhone = function(requestURL) {
liberator.open(signOutURL, liberator.NEW_TAB);
}
});
- req.addEventListener('onFailure', function(res) {
+ req.addEventListener('failure', function(res) {
liberator.echoerr('Send to phone failed.');
});
req.get();