From 66351c964772c19f84116694c09a270b8e5a0b18 Mon Sep 17 00:00:00 2001 From: teramako Date: Mon, 11 Feb 2013 21:33:02 +0900 Subject: Drop E4X --- lookupDictionary.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lookupDictionary.js b/lookupDictionary.js index 6d6e7ff..3acfeca 100644 --- a/lookupDictionary.js +++ b/lookupDictionary.js @@ -164,15 +164,17 @@ SITE_DEFINITION.forEach(function (dictionary) { url = dictionary.url.replace(/%s/g,encodeURIComponent(arg)); } //liberator.log('URL: ' +url); - var result; - getHTML(url, function (str) { - var doc = createHTMLDocument(str); + getHTML(url, function (doc) { var result = getNodeFromXPath(dictionary.xpath, doc, dictionary.multi); if (!result) { liberator.echoerr('Nothing to show...'); + return; } var xs = new XMLSerializer(); - liberator.echo(new XMLList('