now filling the form with the fucking data. currently, unidentified
This commit is contained in:
@@ -120,4 +120,46 @@ function convertHtml(dt){
|
||||
function showContainer(className){
|
||||
classShow = document.getElementsByClassName(className)[0];
|
||||
classShow.style.display = classShow.style.display=="flex"?"none":"flex";
|
||||
}
|
||||
function runme(data){
|
||||
alert(data)
|
||||
}
|
||||
async function fetchContent(uri) {
|
||||
try {
|
||||
const response = await fetch(uri);
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
const content = await response.text();
|
||||
return content;
|
||||
} catch (error) {
|
||||
console.error(`There was a problem with the fetch operation: ${error.message}`);
|
||||
}
|
||||
}
|
||||
function updateForm(uri, eid){
|
||||
fetchContent(uri).then(content => {
|
||||
switch(eid){
|
||||
case "PackageIdentifier":{
|
||||
document.getElementById("PackageIdentifier").value=content.Identifier
|
||||
break
|
||||
}
|
||||
case "PackageVersion":{
|
||||
document.getElementById("PackageVersion").value=content.Version
|
||||
break
|
||||
}
|
||||
case "InstallerType":{
|
||||
document.getElementById("InstallerType").value=content.Type
|
||||
break
|
||||
}
|
||||
case "InstallerUrl":{
|
||||
document.getElementById("InstallerUrl").value=content.Url
|
||||
break
|
||||
}
|
||||
case "InstallerSha256":{
|
||||
document.getElementById("InstallerSha256").value=content.Checksum
|
||||
break
|
||||
}
|
||||
}
|
||||
console.log(content)
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user