From 40e02e0ea8d0e2c12f7f3f97436ad2cd332f1b59 Mon Sep 17 00:00:00 2001 From: Matt Burton Date: Thu, 26 Feb 2009 04:03:11 +0000 Subject: [PATCH] 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 --- translators/JSTOR.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translators/JSTOR.js b/translators/JSTOR.js index b9e2abc54..b330ccd36 100644 --- 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; }