www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 40e02e0ea8d0e2c12f7f3f97436ad2cd332f1b59
parent eaf45ed7c75243d9a2dd83e844be1b72daeeddde
Author: Matt Burton <mcburton@gmail.com>
Date:   Thu, 26 Feb 2009 04:03:11 +0000

Fixes failure on some search pages.  jstor ids (JID) sometimes contain the letter "c" at the beginning causing a regex to fail. I added some more robust JID handling to the regex

Diffstat:
Mtranslators/JSTOR.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/translators/JSTOR.js b/translators/JSTOR.js @@ -65,7 +65,7 @@ function doWeb(doc, url) { var availableItems = new Object(); while (currTitleElmt = allTitlesElmts.iterateNext()) { var title = currTitleElmt.textContent; - var jid = currTitleElmt.href.match(/stable\/(\d+)/)[1]; + var jid = currTitleElmt.href.match(/stable\/([a-z]*?\d+)/)[1]; if (jid) { availableItems[jid] = title; }