-Fixes ScienceDirect translator problem reported in the forums.
This commit is contained in:
parent
e81c019c51
commit
a9920318da
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
-- Set the following timestamp to the most recent scraper update date
|
||||
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2008-05-27 16:45:00'));
|
||||
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2008-05-27 17:30:00'));
|
||||
|
||||
REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b4.r1', '', '2008-03-21 20:00:00', '1', '100', '4', 'Amazon.com', 'Sean Takats and Michael Berkowitz', '^https?://(?:www\.)?amazon',
|
||||
'function detectWeb(doc, url) {
|
||||
|
@ -15945,12 +15945,12 @@ REPLACE INTO translators VALUES ('fe728bc9-595a-4f03-98fc-766f1d8d0936', '1.0.0b
|
|||
Zotero.wait();
|
||||
}');
|
||||
|
||||
REPLACE INTO translators VALUES ('b6d0a7a-d076-48ae-b2f0-b6de28b194e', '1.0.0b3.r1', '', '2008-05-22 19:00:00', '1', '100', '4', 'ScienceDirect', 'Michael Berkowitz', 'https?://www\.sciencedirect\.com[^/]*/science(\/article)?\?(?:.+\&|)_ob=(?:ArticleURL|ArticleListURL|PublicationURL)',
|
||||
REPLACE INTO translators VALUES ('b6d0a7a-d076-48ae-b2f0-b6de28b194e', '1.0.0b3.r1', '', '2008-05-27 17:30:00', '1', '100', '4', 'ScienceDirect', 'Michael Berkowitz', 'https?://www\.sciencedirect\.com[^/]*/science(\/article)?\?(?:.+\&|)_ob=(?:ArticleURL|ArticleListURL|PublicationURL)',
|
||||
'function detectWeb(doc, url) {
|
||||
if ((url.indexOf("_ob=DownloadURL") != -1) || doc.title == "ScienceDirect Login") {
|
||||
return false;
|
||||
}
|
||||
if(url.indexOf("_ob=ArticleURL") == -1) {
|
||||
if(url.indexOf("_ob=ArticleURL") == -1 || url.indexOf("/journal/") != -1) {
|
||||
return "multiple";
|
||||
} else {
|
||||
return "journalArticle";
|
||||
|
@ -15979,7 +15979,7 @@ REPLACE INTO translators VALUES ('b6d0a7a-d076-48ae-b2f0-b6de28b194e', '1.0.0b3.
|
|||
while (next_row = rows.iterateNext()) {
|
||||
var title = next_row.textContent;
|
||||
var link = next_row.href;
|
||||
items[link] = title;
|
||||
if (!title.match(/PDF \(/) && !title.match(/Related Articles/)) items[link] = title;
|
||||
}
|
||||
items = Zotero.selectItems(items);
|
||||
for (var i in items) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user