Update seed on click

This commit is contained in:
tesseractcat 2022-08-24 17:26:22 -04:00
parent 0efc3bf780
commit b1600d4ca3

View File

@ -35,6 +35,7 @@
padding-top: 10px;
}
img {
cursor: pointer;
height: 30vh;
border-radius: 5px;
margin: 10px;
@ -42,6 +43,9 @@
input[type="number"] {
width: 60px;
}
#seed {
width: 150px;
}
</style>
<script>
function append_output(output) {
@ -51,6 +55,10 @@
let alt_text = output[1].toString() + " | " + output[2];
output_node.alt = alt_text;
output_node.title = alt_text;
// Update seed on click
output_node.addEventListener('click', () => {
document.querySelector("#seed").value = output[1];
});
document.querySelector("#results").prepend(output_node);
}