From 05a9932846d5529e3fbd6d01bf130eee8231815c Mon Sep 17 00:00:00 2001 From: Matt Burton Date: Tue, 11 Aug 2009 01:09:30 +0000 Subject: [PATCH] Fixes #1528, generic url prefix...this aught to do it --- translators/Library Catalog (Voyager 7).js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/translators/Library Catalog (Voyager 7).js b/translators/Library Catalog (Voyager 7).js index 2e0cb1f51..88b4b1bbd 100644 --- a/translators/Library Catalog (Voyager 7).js +++ b/translators/Library Catalog (Voyager 7).js @@ -34,7 +34,9 @@ function doWeb(doc, url){ var hostRegexp = new RegExp("^(https?://[^/]+)/"); var hMatch = hostRegexp.exec(url); var host = hMatch[1]; - var urlPrefix = url.indexOf("/uiu/") != -1 ? host + "/uiu/vwebv/exportRecord.do?bibId=" : host + "/vwebv/exportRecord.do?bibId="; + + var urlPrefix = url.match("https?://[^/]*(/[^/]*/)?/?vwebv/")[1] ? host + url.match("https?://[^/]*(/[^/]*/)?/?vwebv/")[1] + "/vwebv/exportRecord.do?bibId=" : host + "/vwebv/exportRecord.do?bibId="; + var namespace = doc.documentElement.namespaceURI; var nsResolver = namespace ? function(prefix) {