From 666418ae6439f54650d425111e1ddd28230b0db5 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 18 Dec 2006 04:25:12 +0000 Subject: [PATCH] frame issue fixes --- chrome/content/zotero/ingester/browser.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/ingester/browser.js b/chrome/content/zotero/ingester/browser.js index 0b3b8d3fc8..39643a3e6b 100644 --- a/chrome/content/zotero/ingester/browser.js +++ b/chrome/content/zotero/ingester/browser.js @@ -125,9 +125,11 @@ Zotero_Ingester_Interface.scrapeThisPage = function(saveLocation) { } Zotero_Ingester_Interface.searchFrames = function(rootDoc, searchDoc) { - for each(var frame in rootDoc.frames) { - if(frame.document == searchDoc || - (frame.document.frames && searchFrames(frame.document, searchDoc))) { + var frames = rootDoc.getElementsByTagName("frame"); + for each(var frame in frames) { + if(frame.contentDocument && + (frame.contentDocument == searchDoc || + Zotero_Ingester_Interface.searchFrames(frame.contentDocument, searchDoc))) { return true; } } @@ -171,6 +173,7 @@ Zotero_Ingester_Interface.contentLoad = function(event) { // if there's already a scrapable page in the browser window, and it's // still there, ensure it is actually part of the page, then return if(data.translators && data.translators.length && data.document.location) { + Zotero.debug("already scrapable?"); if(Zotero_Ingester_Interface.searchFrames(rootDoc, data.document)) { return; } else {