Created
April 26, 2022 14:58
-
-
Save ddrscott/6e3fa173ae7f29da57b943f274e781b8 to your computer and use it in GitHub Desktop.
Simple color picker input maker. Every time it's used. It will append to existing container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((d)=>{ | |
let z=d.querySelector("#__z"); | |
if (!z) { | |
z = d.createElement("div"); | |
z.setAttribute("id", "__z"); | |
z.setAttribute("style", "z-index: 999999; padding: 1em; position:fixed; display:flex; width:100vw; top: 0px; left:0px; align-items: center; flex-direction: row; flex-wrap: nowrap; align-content: space-around; justify-content: center; "); | |
d.body.appendChild(z); | |
} | |
let e=d.createElement("input"); | |
e.setAttribute("type", "color"); | |
e.setAttribute("style", "box-shadow: 0px 2px 5px rgba(0, 0, 0, .25); margin: .2em"); | |
z.appendChild(e); | |
})(document) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Link able javascript: