hello.js

var please = require('share');
console.log('thank you');

Tuesday, 26 February, 2019 UTC

Chris Coyier’s Favorite CodePen Demos IV

Chris Coyier’s Favorite CodePen Demos IV

Did you know you can triple-heart things on CodePen? We’ve had that little not-so-hidden feature forever. You can click that little heart button on any Pen (or Project, Collection, or Post) on CodePen to show the creator a little love, but you can click ... more


Tuesday, 26 February, 2019 UTC

JavaScript Proxy

JavaScript Proxy

I’ve always loved the flexibility of Objects and prototypes in JavaScript, but for a long time, I felt that a level of dynamism was lacking. JavaScript eventually added get and set methods for object properties, which was an awesome step, but there was ... more


Friday, 22 February, 2019 UTC

Awesome Analytics with Keen.io (Sponsored)

Awesome Analytics with Keen.io (Sponsored)

As a young developer, I would often make decisions based on what I considered to be common sense or what I would envision appealed to users. What a mistake. As I’ve become more experienced as a developer and a businessman, I’ve realized that analytics ... more


Wednesday, 20 February, 2019 UTC

Building a Landing Page Fast Using the Visual Composer Website Builder (Sponsored)

Building a Landing Page Fast Using the Visual Composer Website Builder (Sponsored)

What if it were possible to build a landing page from top to bottom, including a header and a footer, and do so without any need for writing code? And even if it was possible, could you reasonably expect to do so as easily and quickly as putting together ... more


Tuesday, 19 February, 2019 UTC

Using Slack Slash Commands to Send Data from Slack into Google Sheets

Using Slack Slash Commands to Send Data from Slack into Google Sheets

Since I work from home, most of my daily work interactions happen through Slack. It’s my equivalent to the water cooler. A place to hang out and discuss ideas with friends. I’m part of a book recommendations channel. People share books all the time, ... more


Monday, 4 February, 2019 UTC

CSS :placeholder-shown

CSS :placeholder-shown

One of the first plugins that would hit a new framework in the early days of JavaScript frameworks was a placeholder plugin, which is why we were so excited when HTML5 brought us the placeholder attribute. Then CSS lovers like me were thrilled when the ... more


Monday, 28 January, 2019 UTC

prefers-color-scheme: CSS Media Query

prefers-color-scheme: CSS Media Query

One device and app feature I’ve come to appreciate is the ability to change between light and dark modes. If you’ve ever done late night coding or reading, you know how amazing a dark theme can be for preventing eye strain and the headaches that result. ... more


Tuesday, 22 January, 2019 UTC

React indeterminate

React indeterminate

I’ve fallen in love with React.js and JSX over the years; state-based rendering and a logical workflow have made me see the light of this modern framework. That doesn’t mean I don’t sometimes get a bit frustrated that the “simple” things seem harder ... more


Tuesday, 15 January, 2019 UTC

JavaScript Labels

JavaScript Labels

No matter how long you’ve been a JavaScript developer, there will always be language features that you didn’t know about until you saw them in a fringe piece of code. Your reaction generally is a bit like: One of those features I see developers quizically ... more


Tuesday, 15 January, 2019 UTC

Colorized Brackets for IDE

Colorized Brackets for IDE

Coders treat their text editors and IDE’s like fragile beings, and for good reason: we spend a ton of time in them and having our tweaks and extensions can make us incredibly productive for our personal workflows. I always love hearing about what extensions ... more


Saturday, 5 January, 2019 UTC

Background Sync with Service Workers

Background Sync with Service Workers

Service workers have been having a moment. In March 2018, iOS Safari began including service workers — so all major browsers at this point support offline options. And this is more important than ever — 20% of adults in the United States are without ... more


Monday, 31 December, 2018 UTC

Goals for 2019

Goals for 2019

Every turn of the year is a new opportunity to start over, set goals, and renew optimism that time can heal wounds and drive us to change and achieve. I did really well with my 2018 goals: I started a fun podcast with TrackJS’ Todd Gardener I found my ... more


Tuesday, 25 December, 2018 UTC

Nested Destructuring

Nested Destructuring

Destructuring in JavaScript can initially feel confusing but the truth is that destructuring can make your code a bit more logical and straight forward. Destructuring does look a bit more complex when you’re looking for a property several objects deep, ... more


Monday, 24 December, 2018 UTC

Force Download with JavaScript

Force Download with JavaScript

Force download scripts have been an important part of internet usability for a long time. I can attest to that by the number of times I’ve implemented this feature on the server side and the popularity of my PHP Force Download post, even to this day. ... more


Tuesday, 18 December, 2018 UTC

CSS Ellipsis Beginning of String

CSS Ellipsis Beginning of String

I was incredibly happy when CSS text-overflow: ellipsis (married with fixed width and overflow: hidden was introduced to the CSS spec and browsers; the feature allowed us to stop trying to marry JavaScript width calculation with string width calculation ... more


Tuesday, 11 December, 2018 UTC

JavaScript waitForever

JavaScript waitForever

Writing mochitests for new features in DevTools can be difficult and time-consuming. There are so many elements interacting in an async manner that I oftentimes find myself using the debugger to debug the debugger! In the case where it’s unclear what ... more


Wednesday, 28 November, 2018 UTC

Get Viewport Lines and Columns in CodeMirror

Get Viewport Lines and Columns in CodeMirror

CodeMirror is an amazing utility for presenting code in a browser environment. Syntax highlighting, widgets, and a number of advanced functions make it a unique, useful tool. When using CodeMirror inside the Firefox DevTools debugger, I found that adding ... more


Monday, 19 November, 2018 UTC

Script & Style Show: Episode 26: Web Games with ExcaliburJS with Erik Onarheim and Kamran Ayub

Script & Style Show: Episode 26: Web Games with ExcaliburJS with Erik Onarheim and Kamran Ayub

In this episode: Todd returns from a vacation to Disney and gives David some tips about surviving a family visit to Orlando’s most famous theme parks. Erik Onarheim and Kamran Ayub join the guys to discuss HTML5 games, the Excalibur JavaScript HTML5 ... more


Monday, 29 October, 2018 UTC

Lessons in Failure: Removing the Old Debugger from Firefox

Lessons in Failure: Removing the Old Debugger from Firefox

Joining the Firefox DevTools team was a dream come true for me. I shared why in the first episode of the Script & Style show but the quick summary is that I grew up loving Firefox (even before it was called “Firefox”) because Mozilla cared about ... more


Tuesday, 23 October, 2018 UTC

Real-time Geolocation & Reverse IP Lookup with ipapi (Sponsored)

Real-time Geolocation & Reverse IP Lookup with ipapi (Sponsored)

There’s an incredible amount you can do when you know where your web visitor is located. You can target advertising to the user, you can load maps of nearby search queries, you can localize website verbiage, you can customize content for their region, ... more


Tuesday, 23 October, 2018 UTC

Find and Change Default App for File Type from Command Line

Find and Change Default App for File Type from Command Line

There are few things more frustrating to any computer user than files opening in an unwanted application. Sure you can use the Open menu item in the desired application but we all just want to double-click a file and see it open in the application we ... more


Monday, 8 October, 2018 UTC

How to Get and Set CSS Variable Values with JavaScript

How to Get and Set CSS Variable Values with JavaScript

CSS variables are a very welcome addition to the language, despite them being incredibly basic. Sure we could use SASS or stylus but languages should never count on developers relying on frameworks and toolkits to accomplish what we know we need. And ... more


Friday, 21 September, 2018 UTC

Script & Style Show: Episode 22: JavaScript, Mentoring, and Blockchain with Kyle Simpson

Script & Style Show: Episode 22: JavaScript, Mentoring, and Blockchain with Kyle Simpson

In this episode: David and Todd discuss the best holiday every: National Cheeseburger Day. After the salivation ended, David and Todd welcome Kyle Simpson, aka getify, to the show. Kyle’s a well known JavaScript super hero so we jumped on a variety of ... more


Thursday, 20 September, 2018 UTC

Script & Style Show: Episode 21: Third Party JavaScript and Web Performance with Charlie Vazac

Script & Style Show: Episode 21: Third Party JavaScript and Web Performance with Charlie Vazac

On this week’s episode: David shrugs aside the scars of the week’s DevTools Debugger development to welcome this week’s guest: Charlie Vazac. Charlie boasts the title of Senior Architect at Akamai and joins David and Todd to talk about third party JavaScript, ... more


Thursday, 13 September, 2018 UTC

Aliases with JavaScript Destructuring

Aliases with JavaScript Destructuring

Destructuring in JavaScript has totally changed the way JavaScript is written these days; code is more concise to write but but, from a visual standpoint, the syntax of the language has changed so much. Any good developer knows, however, that change ... more


Monday, 10 September, 2018 UTC

Object.freeze: Immutable Objects

Object.freeze: Immutable Objects

One of my favorite part of JavaScript has always been mutability of objects. I loved that MooTools and likewise frameworks could modify native prototypes to enhance them with functionality we knew the language need; in fact, I credit MooTools with pushing ... more


Friday, 7 September, 2018 UTC

Twilio: the Ultimate Communication Tool

Twilio: the Ultimate Communication Tool

My favorite part of the mobile revolution was the explosion of communication tools. I grew up chatting on AOL Instant Messenger, MSN Messenger, and other desktop messaging tools, so when mobile phones took on text messaging, I was hyped for a new generation ... more


Tuesday, 4 September, 2018 UTC

Slides Review: Create Awesome Animated Websites

Slides Review: Create Awesome Animated Websites

Many of the impressive product websites I see these days are single-page sites with elegant animations and responsive elements; responsive images, responsive font-sizes, and responsive backgrounds. Whenever I see these sites I wonder how these sites ... more


Wednesday, 29 August, 2018 UTC

Array and Boolean

Array and Boolean

One of the annoyances of old-school JavaScript was side effects; then Array.prototype got methods like filter , map , and forEach so we didn’t need to burn variables before looping over values. I can’t explain how happy I am that the JavaScript language ... more


Sunday, 12 August, 2018 UTC

Replace Repeated Characters with JavaScript

Replace Repeated Characters with JavaScript

URLs can be tricky to work with because they can be more complicated than the traditional URL format you type in. I was again reminded of this when I was parsing Webpack URLs when I saw this beauty: webpack-internal:///../rbd/pnpm-volume/144384a5-85d9-4142-b9b9-168eea22eb97/node_modules/.registry.npmjs.org/fbjs/0.8.17/node_modules/fbjs/lib/isNode.js ... more