diff --git a/chrome/chromeFiles/content/scholar/xpcom/translate.js b/chrome/chromeFiles/content/scholar/xpcom/translate.js index 4e8d6e7eb..ae21743c3 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/translate.js +++ b/chrome/chromeFiles/content/scholar/xpcom/translate.js @@ -1095,9 +1095,7 @@ Scholar.Translate.prototype._itemDone = function(item) { if(this.type == "web") { if(!attachment.url && !attachment.document) { Scholar.debug("not adding attachment: no URL specified"); - } - - if(attachment.downloadable && this._downloadAssociatedFiles) { + } else if(attachment.downloadable && this._downloadAssociatedFiles) { if(attachment.document) { attachmentID = Scholar.Attachments.importFromDocument(attachment.document, myID); @@ -1223,7 +1221,16 @@ Scholar.Translate.prototype._runHandler = function(type, argument) { returnValue = this._handlers[type][i](this, argument); } } catch(e) { - Scholar.debug(e+' in handler '+i+' for '+type); + if(this._parentTranslator) { + // throw handler errors if they occur when a translator is + // called from another translator, so that the + // "Could Not Translate" dialog will appear if necessary + throw(e+' in handler '+i+' for '+type); + } else { + // otherwise, fail silently, so as not to interfere with + // interface cleanup + Scholar.debug(e+' in handler '+i+' for '+type); + } } } } diff --git a/scrapers.sql b/scrapers.sql index 9110c0ccf..337a7f9ae 100644 --- a/scrapers.sql +++ b/scrapers.sql @@ -1773,7 +1773,7 @@ REPLACE INTO "translators" VALUES ('cf87eca8-041d-b954-795a-2d86348999d5', '2006 if (prefix == ''x'') return namespace; else return null; } : null; - var xpath = ''/html/body/table/tbody/tr[td[1][@id="bold"]][td[2]]''; + var xpath = ''//table/tbody/tr[td[1][@id="bold"] or td[@class="recordTD"]][td[2]]''; var elmts = newDoc.evaluate(xpath, newDoc, nsResolver, XPathResult.ANY_TYPE, null); var elmt;