mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-08-26 06:01:49 +02:00
Cleaning code
This commit is contained in:
parent
cd2d967f71
commit
084ea6373c
@ -14,15 +14,15 @@
|
|||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
function update_file(filename) {
|
function update_file(filename) {
|
||||||
file=filename+'.dat'
|
var file=filename+'.dat';
|
||||||
|
var lnk_file=document.getElementById('lnk_file');
|
||||||
lnk_file.setAttribute('href',getFullDataPath(file));
|
lnk_file.setAttribute('href',getFullDataPath(file));
|
||||||
lnk_file=document.getElementById('lnk_file');
|
|
||||||
data.load(file,onApplyData);
|
data.load(file,onApplyData);
|
||||||
}
|
}
|
||||||
function onApplyData(dat) {
|
function onApplyData(dat) {
|
||||||
const Cite = require('citation-js');
|
const Cite = require('citation-js');
|
||||||
const LatexInline=['\\(','\\)']
|
const LatexInline=['\\(','\\)'];
|
||||||
par=document.getElementById("data_par")
|
var par=document.getElementById("data_par");
|
||||||
par.innerHTML='';
|
par.innerHTML='';
|
||||||
var md=[];
|
var md=[];
|
||||||
var els=[];
|
var els=[];
|
||||||
@ -45,7 +45,7 @@
|
|||||||
par.appendChild(node);
|
par.appendChild(node);
|
||||||
|
|
||||||
});
|
});
|
||||||
let publi = new Cite(dat.doi.string)
|
var publi = new Cite(dat.doi.string)
|
||||||
var lnkdoi = document.createElement("a");
|
var lnkdoi = document.createElement("a");
|
||||||
let output = publi.format('bibliography', {
|
let output = publi.format('bibliography', {
|
||||||
format: 'html',
|
format: 'html',
|
||||||
@ -59,20 +59,15 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
window.onload=function() {
|
function onKeyDown(e) {
|
||||||
console.info("Loaded")
|
|
||||||
var inp = document.getElementById("inp_filename");
|
|
||||||
inp.addEventListener("keydown", function (e) {
|
|
||||||
if (e.keyCode === 13) { //checks whether the pressed key is "Enter"
|
if (e.keyCode === 13) { //checks whether the pressed key is "Enter"
|
||||||
update_file(inp.value);
|
update_file(e.target.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<label>Write a data file name without extension<br/>
|
<label>Write a data file name without extension<br/>
|
||||||
<input type="text" id='inp_filename'></input>
|
<input type="text" id='inp_filename' onkeydown="onKeyDown(event)"></input>
|
||||||
</label><br/>
|
</label><br/>
|
||||||
<p id=data_par></p>
|
<p id=data_par></p>
|
||||||
<a target="_blank" id='lnk_file' type='text/plain'>Go to file</a>
|
<a target="_blank" id='lnk_file' type='text/plain'>Go to file</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user