Trans: Fix for ToC parsing in Highwire 2.0, reported http://forums.zotero.org/discussion/15140
This commit is contained in:
parent
d4550807d8
commit
f4f7ab93e9
1 changed files with 15 additions and 14 deletions
|
@ -8,7 +8,7 @@
|
|||
"priority":100,
|
||||
"inRepository":"1",
|
||||
"translatorType":4,
|
||||
"lastUpdated":"2010-11-10 10:20:00"
|
||||
"lastUpdated":"2010-11-11 21:19:55"
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -64,8 +64,10 @@ function doWeb(doc, url) {
|
|||
var arts = new Array();
|
||||
if (detectWeb(doc, url) == "multiple") {
|
||||
var items = new Object();
|
||||
if (doc.title.match("Table of Contents") || doc.title.match("Early Edition") || url.match("content/firstcite")) {
|
||||
var searchx = '//li[contains(@class, "cit toc-cit") and not(ancestor::div/h2/a/text() = "Correction" or ancestor::div/h2/a/text() = "Corrections")]';
|
||||
if (doc.title.match("Table of Contents")
|
||||
|| doc.title.match("Early Edition")
|
||||
|| url.match("content/firstcite")) {
|
||||
var searchx = '//li[contains(@class, "toc-cit") and not(ancestor::div/h2/a/text() = "Correction" or ancestor::div/h2/a/text() = "Corrections")]';
|
||||
var titlex = './/h4';
|
||||
} else if (url.match("content/by/section") || url.match("cgi/collection/.+")) {
|
||||
var searchx = '//li[contains(@class, "results-cit cit")]';
|
||||
|
@ -99,7 +101,6 @@ function doWeb(doc, url) {
|
|||
return false;
|
||||
}
|
||||
Zotero.Utilities.HTTP.doGet(arts, function(text) {
|
||||
// FIXME This function should be redone with XPath to speed things up
|
||||
var id, match, newurl, pdfurl, get;
|
||||
/* Here, we have to use three phrasings because they all occur, depending on
|
||||
the journal.*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue