mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-11-04 13:13:55 +01:00
Use jQuery for click event
This commit is contained in:
parent
aff6512513
commit
02eb8d545a
@ -28,20 +28,18 @@ draft: false
|
||||
if(key[0] in queryDic){
|
||||
var filename=queryDic[key[0]];
|
||||
var textPromise=getTextFromFileUrlAsync(filename)
|
||||
btn_download=document.getElementById("btn_download");
|
||||
btn_download.onclick=function(){
|
||||
$("#btn_download").click(function(){
|
||||
window.open(filename,"_self");
|
||||
}
|
||||
})
|
||||
document.getElementById('fileTitle').innerText=filename;
|
||||
document.getElementById('fileContent').innerText=await textPromise;
|
||||
document.getElementById('file').hidden=false;
|
||||
document.getElementById("div_btn").hidden=false;
|
||||
} else if(key[1] in queryDic){
|
||||
var base64=queryDic[key[1]];
|
||||
var btn_download=document.getElementById("btn_download");
|
||||
btn_download.onclick=function(){
|
||||
$("#btn_download").click(function(){
|
||||
window.open(String.raw`data:text/plain;base64,${base64}`,"_self")
|
||||
}
|
||||
})
|
||||
document.getElementById('fileTitle').hudden=true
|
||||
document.getElementById('fileContent').innerText=atob(base64)
|
||||
document.getElementById('file').hidden=false;
|
||||
|
Loading…
Reference in New Issue
Block a user