Here's my slight improvement to the inlining I use for the sidebar over there 👉.. this is how the sidebar comments etc are always up to date without me having to regenerate every page of this static site every time.
<iframe src="/misc/sidebar2/" onload="a=this;b=a.contentDocument;a.before((b.body||b).children[0]);a.remove()"></iframe>
I can't remember where I got this code from originally, I think it was here 1, but it starts off as an iframe, then the content of the iframe pops right into the page. By the time you see it 2 it's no longer an iframe, the content is really in the page.
My original tweak was to save a few chars assigning this
to a variable and now I realise I can save a bit more. It's useful as it is repeated so much, every little helps.
⬅️ Walked to Sandgate :: First day of everyone being at home ➡️
Paulʼs weblog - I live in Hythe in the deep South. Married + dad to two, I am a full stack web engineer, + I do js / node, some ruby, other languages etc. My hobbies are pubbing, running, restaurants, home-automation 🤖 + other diy stuff, history, family tree stuff, television, squirrels, pirates ☠️, lego, + time travel.