Content filed under “JavaScript”
Bypass service worker on localhost permalink
A progressive disclosure component permalink
Create a user controlled dark or light mode permalink
Automatic dark and light themes, based on system user-preferences, are handy but in this tutorial, we take that one step further and give our users control.
Build a light and global state system permalink
Using Proxies and subscriber functions, we can create an observable, reactive state system with a tiny footprint.
Use a set to remove array duplicates permalink
Load all focusable elements with JavaScript permalink
A handy helper function that will load all user-focusable elements inside a parent element for you.
Build a fully-responsive, progressively enhanced burger menu permalink
In this premium tutorial, we’re going to build a burger menu from the ground up, using progressive enhancement, ResizeObserver, Proxy state and of course, super-solid HTML and CSS that pull from the CUBE CSS principles.
Convert a 2D array into a flat, 1D array of unique items permalink
Convert a messy multidimensional array into a nice single dimension array of unique items.