Recently it became well-known that websites can leak information about a user based on if that user is logged in or not, with this example that can demonstrate the issue. I’d recommend reading that page for a quick overview of how it can be done (but note that it is not the only way, as I will discuss below). So how can we properly prevent this information leak?Continue reading
This project was developed for a client who wanted to add some new features to an existing Flash-based project, but was running into some limitations due to the sand-boxing features which are even present when publishing a desktop application.Continue reading
UPDATE: This is now obsolete, with the adoption of WebExtensions.
Now that Firefox has built-in developer tools, it makes sense for developer add-ons integrate with them. MDN has some examples on creating a developer tools panel, but the examples do not look anything like the built-in tools, and do not offer any information on how to do so.
In order to make an add-on look just like the built-in tools, these are the technologies we will have to use.Continue reading
If you ever wanted to use scroll events in your web app, you’ve probably found what a mess it is, I know I did when I was developing this the theme used on this website. There are snippets out there to try to resolve legacy browser issues, but all of them are half-baked and missing basic functionality such as proper feature-detection and the ability to remove an event listener. All of these issues seems simple, but are actually quite complex to implement properly, and without memory leaks.
We can do better! That’s why I created this library.
Recently I decided to try out webpack as a replacement for Browserify, and it didn’t disappoint! Out-of-the-box, webpack even support’s AMD, so RequireJS-based libraries can be used as-is. This got me thinking, jQuery switched to RequireJS a while back for their source code and build process, so I questioned:
Could webpack be used to load individual jQuery modules?
Revisional metaboxes in WordPress made easy.
Today, I present to you WordPress Revisional Metabox, a WordPress PHP library to make revisional metaboxes dead-simple, released as open-source on GitHub. This library is even easier to use than the usual procedural methods for registering custom metaboxes, so I have provided an option to disable revisions on a metabox in case revisions are not appropriate for all your metaboxes.
WordPress 2.6 introduced post revisions for the editor so that authors could save revisions of their content. While this feature has been great for storing revisions of the built-in post title, content, and excerpt fields, it was not very flexible for use by developers to store other data.
In WordPress 4.1, the necessary actions and filters were added to facilitate custom metabox revisions, so that developers can hook into this new functionality, but unfortunately the feature remains prohibitively difficult to use.
That is, unless you use this class to abstract away all the difficulties.
Now WordPress developers can use this amazing functionality for their own projects with ease, and improve the user experience for all.
Today I’ve released a new open source library, so I figured what better time to post a new entry in my blog.
My latest open source contribution to the world is jquery-ajaxreadystate, a jQuery plugin which adds a new AJAX function with
readystatechange capabilities, available for download on GitHub, NPM, and Bower.
The jQuery AJAX implementation is somewhat limited in that it does not provide a way of responding to the
readystatechange events that fire during the AJAX request. The
jQuery.ajax API documentation actually states the following.
onreadystatechangemechanism is provided, however, since
statusCodecover all conceivable requirements.
While this statement is true for most use cases, what if you want to access the response headers or status code before the entire request completes, or access the response body as it streams?
Evidently jQuery does not provide this functionality due to browser compatibility issues, so this plugin adds this extra functionality for browsers that support these features (see compatibility notes below).
This plugin works by adding a new method
jQuery.ajaxreadystate method, which acts as a wrapper for
jQuery.ajax, extending the functionality and updating the
jqXHR object to remove the limitations and update properties as the
This is a quick tutorial on importing the example AIRControl projects into Flash Builder. The following screenshots were taken from Flash Builder 4.7 for Mac but the steps for Windows and Flash Builder 4.6 for both platforms are nearly identical (I will note the differences).