HighWire 2.0 pdf downloading problem (and fix)

The HighWire 2.0 translator failed to download the pdf for this url:

http://plantgenome.scijournals.org/content/2/2/134

looking at the code, this is the line that needs to be fixed:
var pdfurl = newurl.slice(0, newurl.lastIndexOf(".")) + ".full.pdf";

that only works if the url is www.blah.com/blah.html, which is not always the case. If you replace that line with the following, it downloads the pdf just fine:

var dotidx = newurl.lastIndexOf(".");
var slashidx = newurl.lastIndexOf("/");
if(dotidx < slashidx) {
var pdfurl = newurl + ".full.pdf";
} else {
var pdfurl = newurl.slice(0, dotidx) + ".full.pdf";
}

Please consider modifying the translator along these lines.

Thanks,
Keith

This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.