mirror of
https://github.com/zotero/zotero.git
synced 2026-10-08 03:08:19 +00:00
frame issue fixes
This commit is contained in:
parent
0c06cecebd
commit
666418ae64
1 changed files with 6 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue