diff --git a/.github/source/tweak/replace.html.pug b/.github/source/tweak/replace.html.pug index 0f6aeef..a58c97b 100644 --- a/.github/source/tweak/replace.html.pug +++ b/.github/source/tweak/replace.html.pug @@ -25,7 +25,7 @@ block script | let box = document.createElement('span'), | color = source.value; | box.className = 'color-box'; - | box.dataset.color = color; + | box.value = color; // Hacky :( | box.style.backgroundColor = color; | source.parentNode.insertBefore(box, source); | source.type = 'hidden'; @@ -33,7 +33,7 @@ block script | picker.on('change', function(r, g, b, a) { | let color = this.color(r, g, b, a); | source.value = color; - | this.source.dataset.color = color; + | this.source.value = color; // Hacky :( | this.source.style.backgroundColor = color; | }); | } @@ -43,4 +43,4 @@ block script block content main p Replace text input with hidden input. - p: input(type='text') + p: input(type='text' value='#f00') diff --git a/tweak/replace.html b/tweak/replace.html index 14b9f18..ee88bec 100644 --- a/tweak/replace.html +++ b/tweak/replace.html @@ -23,7 +23,7 @@

Replace text input with hidden input.

-

+