aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranekos2008-11-26 11:25:03 +0000
committeranekos2008-11-26 11:25:03 +0000
commit1fe141a3390e785d5de12537aad18d5df81a342a (patch)
tree5704e9c7ef5df838b01d43e7328ccf798dfecdd7
parent64ae539a2e9014117ac4ead0beb1dd444a4bb8fe (diff)
downloadvimperator-plugins-1fe141a3390e785d5de12537aad18d5df81a342a.tar.bz2
Follow CVS Head
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24966 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r--multi_requester.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/multi_requester.js b/multi_requester.js
index 60b0f48..5eb0bd5 100644
--- a/multi_requester.js
+++ b/multi_requester.js
@@ -81,6 +81,12 @@ var SITEINFO = [
srcEncode: 'EUC-JP',
urlEncode: 'UTF-8'
},
+ {
+ name: 'metalarchive-band',
+ url: 'http://www.metal-archives.com/search.php?string=%s&type=band',
+ description: 'Metal Archive (band)',
+ xpath: '//table',
+ }
];
var mergedSiteinfo = {};
@@ -165,7 +171,7 @@ var CommandRegister = {
completer: cmdClass.cmdCompleter || function(context, arg, bang) {
var allSuggestions = siteinfo.map(function(s) [s.name, s.description]);
context.title = ['Name', 'Descprition'];
- context.items =
+ context.completions =
context.filter ? allSuggestions.filter(function(s) s[0].indexOf(context.filter) == 0)
: allSuggestions;
},
@@ -538,6 +544,7 @@ var MultiRequester = {
url = res.request.url;
escapedUrl = util.escapeHTML(url);
xpath = res.request.options.siteinfo.xpath;
+ liberator.log(res.responseText)
doc = res.getHTMLDocument(xpath);
if (!doc) throw 'XPath result is undefined or null.: XPath -> ' + xpath;