]> git.cworth.org Git - zombocom-ai/commitdiff
Make the "Safety Prompt" button actually do something.
authorCarl Worth <cworth@cworth.org>
Wed, 7 Dec 2022 01:28:20 +0000 (17:28 -0800)
committerCarl Worth <cworth@cworth.org>
Wed, 7 Dec 2022 01:41:49 +0000 (17:41 -0800)
Eventually it will be a bit more dynamic than this.

index.html

index e8d2239649f82903e3705108ef2c4fb685db9447..2abf186d03a0a521509603b773b881a8e6d0b2ad 100644 (file)
         </div>
 
         <div class="form-row small right">
-          <button>Safety prompt</button>
+          <button id="safety" type="button">Safety prompt</button>
+          <script>
+            const prompt = document.querySelector("#prompt");
+            const safety= document.querySelector("#safety");
+            // TODO: Dynamically generate many different prompts here
+            safety.addEventListener("click", () => {
+                prompt.value = "Matte painting of a Samurai warrior";
+                return false;
+            })
+          </script>
         </div>
 
         <div class="form-row large">
-          <button>Make the infinite possible</button>
+          <button type="submit">Make the infinite possible</button>
         </div>
       </form>
     </p>