aboutsummaryrefslogtreecommitdiffstats
path: root/multi_requester.js
diff options
context:
space:
mode:
authorsuVene2008-11-19 17:40:23 +0000
committersuVene2008-11-19 17:40:23 +0000
commit1167f8d3ed49ae31511107f0974a0fb26874aeb8 (patch)
tree9b1951884f1f78fe78206f73b1a8380c96bb4be8 /multi_requester.js
parente7ed62d50a4b4f6486e944ac95f2aa35cca30d11 (diff)
downloadvimperator-plugins-1167f8d3ed49ae31511107f0974a0fb26874aeb8.tar.bz2
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
Diffstat (limited to 'multi_requester.js')
-rw-r--r--multi_requester.js8
1 files changed, 4 insertions, 4 deletions
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 = {
'<a href="' + escapedUrl + '" class="hl-Title" target="_self">' + escapedUrl + '</a>' +
(new XMLSerializer()).serializeToString(doc).replace(/<[^>]+>/g, function(all) all.toLowerCase()) +
'</div>';
- $U.echo(new XMLList(html));
+ try { $U.echo(new XMLList(html)); } catch (e) { $U.echo(html); }
} catch (e) {
$U.echoerr('error!!: ' + e);