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
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue