forked from FlominatorTM/WikiTree
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFamilySearchAddSource.js
More file actions
33 lines (30 loc) · 838 Bytes
/
Copy pathFamilySearchAddSource.js
File metadata and controls
33 lines (30 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
javascript: var url = prompt("WikiTree profile url");
var name = prompt("long name");
var fs = prompt("FamilySearch ID");
fsAttachSubmitForm({
pid: fs,
title: /* self.wtPerson.getLongNamePrivate()*/ name + " on WikiTree",
url: url,
citation:
'WikiTree contributors, "' +
/*getLongNamePrivate()*/ name +
'", WikiTree, ' +
url +
" (accessed " +
getDateString() +
")",
});
function fsAttachSubmitForm(data) {
var form = document.createElement("form");
form.method = "POST";
form.action =
"https://www.familysearch.org/tree/sources/sourceCA?cid=wikitree-a0T3000000Bhy5yEAB&mode=import&personId=" +
data.pid;
form.target = "_blank";
for (var name in data) {
form.appendChild(hiddenInput(name, data[name]));
}
document.body.appendChild(form);
form.submit();
form.remove();
}