Latest Tutorials
Specify Node Versions with .nvmrc
I've heavily promoted nvm, a Node.js version manager, over the years. Having a tool to manage multiple versions of a language interpreter has been so useful, especially due to the complexity of Node.js package management.One tip I like to give new developers is adding a...
How to Inject a Global with Web Extensions in Manifest V3
For those of you not familiar with the world of web extension development, a storm is brewing with Chrome. Google will stop support for manifest version 2, which is what the vast majority of web extensions use. Manifest version 3 sees many changes but the largest...
How Plugins Enhance The WYSIWYG Editing Experience
Image by JK_Studio from PixabayWYSIWYG editors are one of the core components of any content management system (CMS). A well-coded, feature-filled WYSIWYG HTML editor can distinguish between a CMS users love and one they can't stand. While all WYSIWYG editors have a set of...
JavaScript Event.defaultPrevented
Whether you started with the old
on_____
property oraddEventListener
, you know that events drive user experiences in modern JavaScript. If you've worked with events, you know thatpreventDefault()
andstopPropagation()
are frequently used to handle events. One thing you probably didn't know: there's adefaultPrevented
...7 Ways to Optimize Performance for Your WordPress Site
The vast majority of blogs, news websites, and information websites run on WordPress. While the WordPress developer team and community do their best to ensure wordPress is performant, there are a number of practices you can implement to keep your site blazing fast. Let's...
How to Get Extension Manifest Information
Working on a web extension can be kinda wild -- on one side you're essentially just coding a website, on the other side you're limited to what the browser says you can do in the extension execution environment. One change in that environment is coming...
How to Reverse an Animated GIF
Modifying visual media via code has always been a fascination of mine. Probably because I'm not a designer and I tend to stick to what I'm good at. One visual effect I love is seeing video reversed -- it provides a sometimes hilarious perspective...
CSS :optional
A decade ago HTML and CSS added the ability to, at least signal, validation of form fields. The
required
attribute helped inform users which fields were required, whilepattern
allowed developers to provide a regular expression to match against an<input>
's value. Targeting required fields...Get a Random Array Item with JavaScript
JavaScript Arrays are probably my favorite primitive in JavaScript. You can do all sorts of awesome things with arrays: get unique values, clone them, empty them, etc. What about getting a random value from an array?To get a random item from...
Legacy String Methods for Generating HTML
I'm always really excited to see new methods on JavaScript primitives. These additions are acknowledgement that the language needs to evolve and that we're doing exciting new things. That being said, I somehow just discovered some legacy String methods that you probably shouldn't use...