This shows you the differences between two versions of the page.
| — | avatar [2019/07/17 14:09] (current) – created Alan Shea | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | < | ||
| + | < | ||
| + | <meta charset=" | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | <input type=" | ||
| + | <input type=" | ||
| + | <input type=" | ||
| + | <input type=" | ||
| + | <input type=" | ||
| + | <hr /> | ||
| + | <img src="" | ||
| + | |||
| + | < | ||
| + | // Define UI elements | ||
| + | let inputText = document.querySelector(" | ||
| + | let inputSubmit = document.querySelector(" | ||
| + | let inputColor1 = document.querySelector(" | ||
| + | let inputColor2 = document.querySelector(" | ||
| + | let inputSize = document.querySelector(" | ||
| + | let image = document.querySelector(" | ||
| + | // Generate Action | ||
| + | inputSubmit.addEventListener(' | ||
| + | // Gather options | ||
| + | var hash = inputText.value; | ||
| + | var color1 = inputColor1.value.replace('#', | ||
| + | var color2 = inputColor2.value.replace('#', | ||
| + | var size = inputSize.value; | ||
| + | // Change image src to a preset link with the options as GET parameters | ||
| + | image.src = "/ | ||
| + | }); | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
Copyright © Alan Shea, 2011-2025