122 days ago · Tech · hide · Fediverse post

I saw recently saw a blog post (which annoyingly I can't find any more, but I'll link it if I do), showing off a web component that if I recall correctly, would show (or hide) it's contents depending on a browser feature (I'd guess using the @supports query). That reminded me that I wrote a web component that I use quite a bit (particularly with FFConf), which should really be called do-when, but it's not, it's (stupidly) called when-do (the dash, I guess, being a comma in my head). The component says: when a time occurs or passes, do a what: show, hide or scroll-to. You can get the code from github - which also includes an interactive demo that lets you try the settings. What it is A small web component to toggle on or off depending on wall clock (date) time without affecting the visual layout (with it's own element). Use case I've been using this web component on the FFConf event pages for a number of years to reveal the ticket button if a visitor is sitting on the page (though I…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town