JavaScript library to capture HTML elements being created

I've written about this technique for capturing HTML elements being created before, it's a pretty cool hack using the animation start event and a uniquely named CSS animation to catch newly created elements being added to the document.

JavaScript Document Mutation Events

Sometimes you get a situation where you need to know when a new element has been added to the page with JavaScript. A common example of this is adding event listeners to a certain type of input then adding more of those inputs - the new ones do not get the event. For a simple example it's obviously easier just to add the event handler when adding the new input so let's assume we're talking about something more complex. There used to be an event for this kind of thing

Intercepting AJAX calls from a Greesemonkey script

I recently ran into a situation in which I needed to have something happen just after an AJAX request had completed. Initially that sounded like something that would not really be possible. Not wanting to resort to rapid polling I put a bit more time in to thinking of a solution and came up with this.

Copy text to the clipboard using JavaScript and ZeroClipboard

There are all sorts of reasons why you might want to automatically copy some text to the users clipboard. The reason it can be so useful is actually the same reason it's not possible, it allows data to break out of the webpage sandbox. The clipboard is considered to be part of the operating system so can't be interacted with using JavaScript from a normal page, interestingly it is possible to copy text from the developer console, but that's another story.