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:
parent
eaf45ed7c7
commit
40e02e0ea8
|
@ -65,7 +65,7 @@ function doWeb(doc, url) {
|
||||||
var availableItems = new Object();
|
var availableItems = new Object();
|
||||||
while (currTitleElmt = allTitlesElmts.iterateNext()) {
|
while (currTitleElmt = allTitlesElmts.iterateNext()) {
|
||||||
var title = currTitleElmt.textContent;
|
var title = currTitleElmt.textContent;
|
||||||
var jid = currTitleElmt.href.match(/stable\/(\d+)/)[1];
|
var jid = currTitleElmt.href.match(/stable\/([a-z]*?\d+)/)[1];
|
||||||
if (jid) {
|
if (jid) {
|
||||||
availableItems[jid] = title;
|
availableItems[jid] = title;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user