X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=index.html;h=d3f25aa2494815938573881513d42dcfd9ad4fd1;hb=3fb2bec10ed7b64ae2455abde1febce6156d854e;hp=0654ae41c33cc11f5e416ad2ff04b3ce70dcc901;hpb=d440ee128e5e13e7df16c03e5028484cbee99e05;p=zombocom-ai diff --git a/index.html b/index.html index 0654ae4..d3f25aa 100644 --- a/index.html +++ b/index.html @@ -156,8 +156,18 @@ mute.addEventListener("click", () => { figure.appendChild(img); const figcaption = document.createElement('figcaption'); - const caption_text = document.createTextNode(`${image.prompt} (${image.code})`); + const caption_text = document.createTextNode(`${image.prompt} (${image.code}) `); figcaption.appendChild(caption_text); + + const reuse_button = document.createElement('button'); + reuse_button.appendChild(document.createTextNode("Reuse")); + figcaption.appendChild(reuse_button); + + reuse_button.addEventListener('click', () => { + prompt.value = image.prompt; + window.scrollTo(0,0); + }); + figure.appendChild(figcaption); const dl_comments = document.createElement('dl');