Permalink
Browse files

[CNKI]: Handle iframe in search results (#1404)

  • Loading branch information...
zuphilip authored and adam3smith committed Sep 4, 2017
1 parent 9146ea1 commit 333d5b6ba9b3d2d97b030cae84a12208251a1896
Showing with 9 additions and 1 deletion.
  1. +9 −1 CNKI.js
View
10 CNKI.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcs",
"lastUpdated": "2017-01-01 16:51:46"
"lastUpdated": "2017-09-02 11:17:43"
}
/*
@@ -103,6 +103,14 @@ function getTypeFromDBName(dbname) {
}
function getItemsFromSearchResults(doc, url, itemInfo) {
var iframe = doc.getElementById('iframeResult');
if (iframe) {
var innerDoc = iframe.contentDocument || iframe.contentWindow.document;
if (innerDoc) {
doc = innerDoc;
}
}
var links = ZU.xpath(doc, '//tr[not(.//tr) and .//a[@class="fz14"]]');
var aXpath = './/a[@class="fz14"]';
if(!links.length) {

0 comments on commit 333d5b6

Please sign in to comment.