-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
18 lines (17 loc) · 717 Bytes
/
script.js
File metadata and controls
18 lines (17 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function copyCommand() {
const command = document.getElementById("command").value;
navigator.clipboard.writeText(command).then(() => {
alert("Command copied to clipboard!");
}).catch(err => {
console.error("Failed to copy command: ", err);
});
}
function writeCommand() {
var arch = document.getElementById("arch").value;
var ram = document.getElementById("ram").value;
var disk = document.getElementById("disk").value;
var cd = document.getElementById("cd").value;
var boot = document.getElementById("boot").value;
var command = `qemu-system-${arch} -m ${ram} -hda ${disk} -cdrom ${cd} -boot ${boot}`;
document.getElementById("command").value = command;
}