Show HN: A TO-DO app that fits inside a single tweet
229 characters using plain JavaScript and proper forms and buttons, for somewhat better accessibility:<p><pre><code>  document.write(&quot;&lt;form onsubmit=&#x27;return l.insertAdjacentHTML(`beforeend`,`&lt;li&gt;${x.value.replace(&#x2F;&amp;&#x2F;,`&amp;amp;`).replace(&#x2F;&lt;&#x2F;g,`&amp;lt;`)} &lt;button onclick=this.parentNode.remove()&gt;&lt;&#x2F;button&gt;`),x.value=``,!1&#x27;&gt;&lt;input id=x&gt;&lt;&#x2F;form&gt;&lt;ul id=l&gt;&quot;)
</code></pre>
This even leaves enough space in the tweet for &lt;input type=submit value=Add&gt; if you wanted a button beside the initial text box.<p>As you see, it’d be shorter as straight HTML without the “body must be empty, you can only write inside a &lt;script&gt; tag” requirement, as you could just drop the document.write(&quot;…&quot;) wrapping.