What would it take to make writing vanilla JavaScript more pleasant? After reviewing the code for my blogging engine Lamb I concluded:

Most of the code adding interactivity to personal websites comes down to running code after the page has loaded; niceties to query the DOM and hook into events. There's probably more but this is a start. The result is shorthand.js. Hint: it's not dissimilar to jQuery, but you can fully learn it in 5 minutes.

Which simplifies code to:

onLoaded(() =&gt; {
const forms = $$(&#039;form.form-delete&#039;)
forms?.forEach($form =&gt; $form.on(&#039;submit&#039;, ev =&gt; {
cancel(ev)
let confirmed = confirm(`Really delete status ${ev.target.dataset.id}?`)
if (!confirmed) return
ev.target.submit()
}))
})

This is just a prototype and will evolve.