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

This commit is contained in:
Matt Burton 2009-02-26 04:03:11 +00:00
parent eaf45ed7c7
commit 40e02e0ea8

View file

@ -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;
}