X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=dot-files%2F_vimperator%2Fplugin%2Fmulti_requester_js;h=4b9c9f9b7765edc00cc45264f42c42f65ba33353;hb=a807b4609220d6a60673008b962d2456d4ccebb7;hp=88f24e035308e81f24e892d36e622f584b944c66;hpb=aafe4912ff7050d1824b920c810934246e3b749a;p=sugar.git diff --git a/dot-files/_vimperator/plugin/multi_requester_js b/dot-files/_vimperator/plugin/multi_requester_js index 88f24e0..4b9c9f9 100644 --- a/dot-files/_vimperator/plugin/multi_requester_js +++ b/dot-files/_vimperator/plugin/multi_requester_js @@ -5,18 +5,16 @@ http://www.opensource.jp/licenses/mit-license.html }}} END LICENSE BLOCK ***/ // PLUGIN_INFO//{{{ -var PLUGIN_INFO = - - {NAME} - request, and the result is displayed to the buffer. - リクエストの結果をバッファに出力する。 - suVene - 0.4.15 - MIT - 2.0pre - 2.1pre - http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/multi_requester.js - + suVene + MIT + +

+ -; + ]]> +

+`; //}}} (function() { if (!liberator.plugins.libly) { @@ -116,14 +114,14 @@ var SITEINFO = [ name: "alc", description: "SPACE ALC (\u82F1\u8F9E\u6717 on the Web)", url: "http://eow.alc.co.jp/%s/UTF-8/", - xpath: 'id("resultList")' + xpath: 'id("resultsList")' } ]; var libly = liberator.plugins.libly; var $U = libly.$U; var logger = $U.getLogger("multi_requester"); var mergedSiteinfo = {}; -var store = storage.newMap('plugins-multi_requester', true); +var store = storage.newMap('plugins-multi_requester', {store: true}); //}}} // Vimperator plugin command register {{{ @@ -242,7 +240,7 @@ var DataAccess = { if (useWedata) { logger.log("use wedata"); - var wedata = new libly.Wedata("Multi%20Requester"); + var wedata = new libly.Wedata("Multi Requester"); wedata.getItems(24 * 60 * 60 * 1000, function(item) { var site = item.data; @@ -306,7 +304,8 @@ var MultiRequester = { let srcEncode = info.srcEncode || "UTF-8"; let urlEncode = info.urlEncode || srcEncode; - let repStrCount = let (m = url.match(/%s/g)) (m && m.length); + let m = url.match(/%s/g); + let repStrCount = m && m.length; if (repStrCount && !parsedArgs.strs.length) continue; // via. lookupDictionary.js @@ -332,9 +331,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 +393,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;