www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 6be11dc141908bb70627a3fc0c1f39d49740dd54
parent 1589c5be2cb08ed076da6cf165627e3cea53fe09
Author: Elena Razlogova <elena.razlogova@gmail.com>
Date:   Sat, 13 Dec 2008 20:43:58 +0000

Adapts Ancestry.com translator to new urls


Diffstat:
Mtranslators/Ancestry.com US Federal Census.js | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/translators/Ancestry.com US Federal Census.js b/translators/Ancestry.com US Federal Census.js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2008-03-24 02:15:00" + "lastUpdated":"2008-12-13 21:00:00" } function detectWeb(doc, url) { @@ -42,7 +42,7 @@ function detectWeb(doc, url) { indiv = 1; } - checkURL = doc.location.href.replace("pf=", "").replace("&h=", ""); + checkURL = doc.location.href.replace("pf=", ""); if(doc.location.href == checkURL && indiv == 1) { return "bookSection"; } @@ -122,12 +122,12 @@ function scrape(doc) { if(m) { db = m[1]; } - var snapshotRe = /recid=([0-9]+)/; + var snapshotRe = /\&h=([0-9]+)/; var m = snapshotRe.exec(doc.location.href); if(m) { - snapshotURL = "http://search.ancestry.com/cgi-bin/sse.dll?db="+db+"&indiv=1&pf=1&recid="+m[1]; + snapshotURL = "http://search.ancestry.com/cgi-bin/sse.dll?db="+db+"&indiv=1&pf=1&h="+m[1]; newItem.attachments.push({title:"Ancestry.com Snapshot", mimeType:"text/html", url:snapshotURL, snapshot:true}); - cleanURL = "http://search.ancestry.com/cgi-bin/sse.dll?indiv=1&db="+db+"&recid="+m[1]; + cleanURL = "http://search.ancestry.com/cgi-bin/sse.dll?indiv=1&db="+db+"&h="+m[1]; newItem.url = cleanURL; } @@ -179,7 +179,7 @@ function scrape(doc) { } function doWeb(doc, url) { - var resultsRegexp = /recid=/; + var resultsRegexp = /&h=/; if(resultsRegexp.test(url)) { scrape(doc); } else {