static: keep url <pre> at constant rendering height

This commit is contained in:
Astro 2023-10-27 01:44:22 +02:00
parent 1ce14cb152
commit 2b9ad7b4a2
2 changed files with 5 additions and 3 deletions

View file

@ -50,14 +50,16 @@
<div>
<input id="tag" len="20" placeholder="tag"/>
</div>
<pre id="tag-url"></pre>
<pre id="tag-url">
</pre>
</article>
<article>
<h2>Follow posts by instance</h2>
<div>
<input id="instance" len="20" placeholder="example.xyz"/>
</div>
<pre id="instance-url"></pre>
<pre id="instance-url">
</pre>
</article>
</section>

View file

@ -7,7 +7,7 @@
var value = encodeURIComponent(inputEl.value.replace(/^#/, ""));
preEl.innerText = value ?
"https://" + document.location.host + "/" + id + "/" + value :
"";
"\n";
}, 10);
}
inputEl.addEventListener('change', onChange);