From 1167f8d3ed49ae31511107f0974a0fb26874aeb8 Mon Sep 17 00:00:00 2001 From: suVene Date: Wed, 19 Nov 2008 17:40:23 +0000 Subject: modify siteinfo attribute 'resultXPath' to 'xpath' git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24371 d0d07461-0603-4401-acd4-de1884942a52 --- multi_requester.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'multi_requester.js') diff --git a/multi_requester.js b/multi_requester.js index f7e9db6..0ed39f4 100644 --- a/multi_requester.js +++ b/multi_requester.js @@ -4,7 +4,7 @@ * @description request, and the result is displayed to the buffer. * @description-ja リクエストの結果をバッファに出力する。 * @author suVene suvene@zeromemory.info - * @version 0.2.1 + * @version 0.2.2 * @minVersion 2.0pre * @maxVersion 2.0pre * ==/VimperatorPlugin== @@ -482,7 +482,7 @@ var MultiRequester = { var ttbu = Components.classes['@mozilla.org/intl/texttosuburi;1'] .getService(Components.interfaces.nsITextToSubURI); url = url.replace(/%s/g, ttbu.ConvertAndEscape(urlEncode, parsedArgs.str)); - $U.log(url); + $U.log(url + '::' + siteinfo.xpath); if (special) { liberator.open(url, liberator.NEW_TAB); @@ -536,7 +536,7 @@ var MultiRequester = { url = res.request.url; escapedUrl = util.escapeHTML(url); - xpath = res.request.options.siteinfo.resultXpath; + xpath = res.request.options.siteinfo.xpath; doc = res.getHTMLDocument(xpath); if (!doc) throw 'XPath result is undefined or null.: XPath -> ' + xpath; @@ -544,7 +544,7 @@ var MultiRequester = { '' + escapedUrl + '' + (new XMLSerializer()).serializeToString(doc).replace(/<[^>]+>/g, function(all) all.toLowerCase()) + ''; - $U.echo(new XMLList(html)); + try { $U.echo(new XMLList(html)); } catch (e) { $U.echo(html); } } catch (e) { $U.echoerr('error!!: ' + e); -- cgit v1.2.3