From 283118b206062403bfd8074b217b9e913d80a512 Mon Sep 17 00:00:00 2001 From: Avram Lyon Date: Thu, 12 May 2011 14:44:13 +0000 Subject: [PATCH] Trans: Updated IEEE Xplore to handle PDF saving pages --- translators/IEEE Xplore.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/translators/IEEE Xplore.js b/translators/IEEE Xplore.js index ab680e7874..e646500f5c 100644 --- a/translators/IEEE Xplore.js +++ b/translators/IEEE Xplore.js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2011-05-05 22:04:16" + "lastUpdated":"2011-05-12 22:04:16" } function detectWeb(doc, url) { @@ -64,18 +64,21 @@ function doWeb(doc, url) { for(var url in items) { // Some pages don't show the metadata we need (http://forums.zotero.org/discussion/16283) // No data: http://ieeexplore.ieee.org/search/srchabstract.jsp?tp=&arnumber=1397982 + // No data: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1397982 // Data: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1397982 var arnumber = url.match(/arnumber=(\d+)/)[1]; - url = url.replace(/\/search\/.*$/, "/xpls/abs_all.jsp?arnumber="+arnumber); + url = url.replace(/\/(?:search|stamp)\/.*$/, "/xpls/abs_all.jsp?arnumber="+arnumber); urls.push(url); } Zotero.Utilities.processDocuments(urls, scrape, function () { Zotero.done(); }); Zotero.wait(); } else { - if (url.indexOf("/search/") !== -1) { + if (url.indexOf("/search/") !== -1 || url.indexOf("/stamp/") !== -1 || url.indexOf("/ielx4/")) { // Address the same missing metadata problem as above + // Also address issue of saving from PDF itself, I hope + // URL like http://ieeexplore.ieee.org/ielx4/78/2655/00080767.pdf?tp=&arnumber=80767&isnumber=2655 var arnumber = url.match(/arnumber=(\d+)/)[1]; - url = url.replace(/\/search\/.*$/, "/xpls/abs_all.jsp?arnumber="+arnumber); + url = url.replace(/\/(?:search|stamp|ielx4)\/.*$/, "/xpls/abs_all.jsp?arnumber="+arnumber); Zotero.Utilities.processDocuments([url], scrape, function () { Zotero.done(); }); Zotero.wait(); } else {