Skip to content

JavaScript

Modifying the JavaScript String Prototype

When manipulating strings in JavaScript, it is often necessary to perform certain functions to escape characters, decode them, and perform other string manipulations. JavaScript makes it easy to modify the String prototype, making it possible to create new methods on String types. As of late, I’ve preferred this method (pun intended) over creating custom functions.

Read More »Modifying the JavaScript String Prototype

Copy Lyrics in Pandora to Clipboard

Today I wanted to follow along in the lyrics with a tune I was enjoying on Pandora, so I searched for the last word in the song I heard. The browser scrolled to the section of the song where the word was located, however, the word was not highlighted. I tried to select the lyrics, and was annoyed to find the lyrics were not selectable. It was then time for a little JavaScript magic to make it possible to select, copy, and paste the lyrics.

Read More »Copy Lyrics in Pandora to Clipboard

Make Cross-Domain AJAX Requests with xdRequest

xdRequest is an open-source JavaScript library that I’ve developed for making cross-domain AJAX requests. In this day and age, with web browsers becoming very fast and powerful, it has become quite possible to build web applications with much of the work performed by the client. xdRequest makes it possible to easily pull data from other sources and manipulate it all on the client-side. With xdRequest, you will no longer need to perform data extractions/manipulations from other sources on a server. It can all happen right in the browser.

Read More »Make Cross-Domain AJAX Requests with xdRequest