forked from FlominatorTM/WikiTree
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLABW.js
More file actions
25 lines (24 loc) · 903 Bytes
/
Copy pathLABW.js
File metadata and controls
25 lines (24 loc) · 903 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
javascript:
var archive = "Staatsarchiv Freiburg";
var titleDiv = document.getElementById('titel');
var signature = titleDiv.firstChild.innerText + "";
var signature = signature.replace("1 Bd.", "") ;
var selectedBild = getSelectedOption(document.getElementsByName('originalBilddatei')[0]).text;
var bild = (selectedBild + "").replace("Bild ", "");
var id = document.getElementsByName('aid')[0].value;
var link = "http://www.landesarchiv-bw.de/plink/?f=" + id + "-" + bild;
/*https://www.dyn-web.com/tutorials/forms/select/selected.php */
function getSelectedOption(sel)
{
var opt;
for ( var i = 0, len = sel.options.length;i < len; i++ )
{
opt = sel.options[i];
if ( opt.selected === true )
{
break;
}
} return opt;
}
prompt("..", archive + ", " + signature + ", [" + link +" " +"picture " + bild +"], #");
;void(0);