2019-08-21 20:04:29 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2019-08-22 10:34:07 +02:00
|
|
|
<head>
|
|
|
|
<script src="scripts/data.js" type="text/javascript"></script>
|
2019-08-21 20:04:29 +02:00
|
|
|
<script>
|
2019-08-22 10:34:07 +02:00
|
|
|
function update_file(filename) {
|
|
|
|
file=filename+'.json'
|
|
|
|
lnk_file.setAttribute('href',getFullDataPath(file));
|
2019-08-22 11:00:58 +02:00
|
|
|
lnk_file=document.getElementById('lnk_file');
|
|
|
|
getDataFromFile(file,onApplyData)
|
|
|
|
}
|
|
|
|
function onApplyData(data) {
|
|
|
|
lnk_doi=document.getElementById('lnk_doi');
|
|
|
|
lnk_doi.setAttribute('href',getDoiUrl(data));
|
|
|
|
}
|
2019-08-21 20:04:29 +02:00
|
|
|
</script>
|
|
|
|
<script>
|
2019-08-22 10:34:07 +02:00
|
|
|
window.onload=function() {
|
|
|
|
var inp = document.getElementById("inp_filename");
|
|
|
|
inp.addEventListener("keydown", function (e) {
|
|
|
|
if (e.keyCode === 13) { //checks whether the pressed key is "Enter"
|
|
|
|
update_file(inp.value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
2019-08-21 20:04:29 +02:00
|
|
|
}
|
|
|
|
</script>
|
2019-08-22 10:34:07 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<label>Write a data file name without extension<br/>
|
|
|
|
<input type="text" id='inp_filename'></input>
|
|
|
|
</label><br/>
|
|
|
|
<a target="_blank" id='lnk_doi'>Go to paper</a>
|
|
|
|
<a target="_blank" id='lnk_file'>Go to file</a>
|
|
|
|
</body>
|
2019-08-21 20:04:29 +02:00
|
|
|
</html>
|