Random projects all by Chris West.
⇩ Continue ⇩

JavaScript Snippet – toggleFullscreen() Apr 26, 2017
at 12:56AM

Making your web app toggle back and forth between full screen mode is a simple enough task as long as you do some feature testing. You can also use this handy function which will step through the 4 different feature tests: This code is based off of documentation found here on MDN. I personally am […]

Canvas – Making A Simple Logo Feb 3, 2017
at 12:31PM

A few days ago while I was working on updating my resume I thought about ways to add my simple “CW” (short for Chris West of course) logo to it. At the time of writing this article I presented my logo on using CSS3: CW Leveraging the Canvas One great thing that Mozilla has […]

Canvas – Animating Pacman Head In JavaScript Feb 2, 2017
at 8:24PM

If your browser supports <canvas> (which if it doesn’t you need to switch to a better one ) you can see a simple JavaScript animation: Image (with link) Canvas Drawing Pacman Drawing Pacman is quite a small task as you would imagine. It simply involves drawing a partial circle with lines going back to the […]

My Interactive Resume – Part 1 Feb 1, 2017
at 10:22AM

Here is my first quick pass at an online resume: There are plenty of times when we want to add everything to our resume to let potential employers know our worth but it can be difficult to know how to really summarize everything. Project Search There are times when we want these potential employers […]

Emoji Search Jan 30, 2017
at 9:00AM

Unicode now offers plenty of emojis that we can add to our code to show on our web pages or web applications. Below is quick-and-dirty emoji search I wrote based on this page from

HTML Hack – Making Any Element Focusable Jan 27, 2017
at 10:21PM

Recently I have been working on making a simple snake game and wanted to know what my options were for capturing keyboard events other than simply adding event listeners to the body, document, or the window. Amongst the obvious reasons for avoiding adding event listeners globally, I just want to make a prototype that will […]

JavaScript Snippet – Convert HTML Table To 2D Array Aug 21, 2016
at 11:09AM

A few days ago I was working on manipulating data that I found in Wikipedia. The data was in a table where the colspans and rowspans were making it difficult to simply programmatically pull data. Then I started looking into code to turn HTML table to JSON but for some reason the rowspans were still […]

JavaScript Snippet – isValidVarName() Aug 17, 2016
at 12:14PM

Now Available in YourJS Recently I was working on a function which needed to determine whether or not a string could be used as a variable name. Variable name validation can get tricky so instead of using a crazy regular expression which includes all keywords (which may change over time) and instead of testing for […]

Installing Watchtower Library on Mac with Wine Apr 2, 2016
at 2:25AM

Instead of always switching to your PC or using a VM just to use the Watchtower Library you can use Wine. Here is how you can do it: Go to the WineBottler home page and download WineBottler (which comes with Wine). Open the image file (the DMG file that you downloaded) and drag-and-drop both Wine […]

JavaScript – Detecting Infinite Loops Mar 16, 2016
at 6:28PM

When allowing a user to input code that could potentially cause an infinite loop, it is nice to test the code first, right? Even, if the code doesn’t run infinitely, it would be nice to know if it takes longer than you would want. One way to nicely test for infinite loops or long running […]