As a long-time player of PC FPS (First Person Shooter) games, I got really excited when Battlefield 3 was announced. I’ve played most of the Battlefield games since the original (Battlefield 1942) and I couldn’t wait to get my hands on the latest game in the series.
I’m not going to spend any time talking about the game, other than that it’s amazing. It’s not perfect, but games seldom are the week they’re released. Either way, I love it.
The thing is, EA did something a little different this time around. Instead of attempting to create an entire social experience in-game—Remember Tribes 2? Ouch—they contracted ESN to create a web-based server brower / social network called Battlelog.
While Battlelog is a fantastic idea, it has a few issues. I can’t address the fact that ESN has included jQuery 1.4.2, jQuery 1.4.4 and YUI 2.5.2 in their concatenated scripts. Nobody can fix that but them. Note: shame on them.
What I can do (and have done) is attempt to address some of the minor annoying issues surrounding refreshing and joining servers.
This AppleScript allows you to very easy copy the path of any open Finder window to the clipboard. Also, in any application’s Open or Save dialog, you can open a “Go to the folder” dialog into which a folder path can be entered. Coincidence?! Instead of typing in that path manually, just run this AppleScript to choose from the paths of all the open Finder windows!
This code provides a simple wrapper for the console's logging methods, and was created to allow a very easy-to-use, cross-browser logging solution, without requiring excessive or unwieldy object detection. If a console object is not detected, all logged messages will be stored internally until a logging callback is added. If a console object is detected, but doesn't have any of the
error logging methods,
log will be used in their place. For convenience, some of the less common console methods will be passed through to the console object if they are detected, otherwise they will simply fail gracefully.
Why go through the tedium of creating both a closure AND a
Note: Includes sample blazingly-fast 0.3kb QSA css selector library with full unit test suite, to help you get started!
jQuery BBQ leverages the HTML5 hashchange event to allow simple, yet powerful bookmarkable #hash history. In addition, jQuery BBQ provides a full .deparam() method, along with both hash state management, and fragment / query string parse and merge utility methods.
This plugin and the jQuery urlInternal plugin supersede the URL Utils plugin.
This would probably actually be better called “Run some arbitrary code that requires jQuery, loading a minimum required version of jQuery first (but only if necessary), affecting the host page as little as possible Bookmarklet Generator” but that wasn’t nearly as catchy as “jQuery Bookmarklet Generator” so I’m going to stick with that.
This boilerplate code is useful for bookmarklets that need jQuery to execute their payload, in situations where you don’t know if jQuery or a specific minimum required version of jQuery will already exist in the page. If you just want to load jQuery itself into a page, check out the Learning jQuery “jQuerify” bookmarklet.
With jQuery equalizeBottoms you can “equalize” the bottoms of multiple elements, making columns heights even, even when CSS refuses to help.
Great news! This plugin won day eight of Media Temple’s 14 Days of jQuery contest. How it beat jQuery Star Wipe, I’ll never know.. but if you’re dying to see what the hype is all about, read on! (note: hype not actual)
jQuery getObject allows you to get and set properties of an object via dot-delimited name string. Inspired by the Dojo methods of the same names.
This jQuery plugin enables very basic bookmarkable #hash history via a cross-browser HTML5 window.onhashchange event.
While this functionality was initially tied to the jQuery BBQ plugin, the event.special window.onhashchange functionality has now been broken out into a separate plugin for users who want just the basic event & back button support, without all the extra awesomeness that BBQ provides.
.filter(), in that it allows you to conditionally process a subset of selected elements, but instead of allowing you to preserve or remove individual elements, it operates on the entire set of elements.
This page contains a collection of minor jQuery plugins which are too small, too simple, or just not exciting enough to require individual pages. More will be added as I find the time… and the code!
With jQuery outside events you can bind to an event that will be triggered only when a specific “originating” event occurs outside the element in question. For example, you can click outside, double-click outside, mouse-over outside, focus outside (and over ten more default “outside” events). Also, if an outside event hasn’t been provided by default, you can easily define your own.
Note that this was previously known as the “jQuery clickoutside” plugin.. but, hey—it’s pretty amazing what a an awesome idea and few more lines of code can do!
jQuery postMessage enables simple and easy window.postMessage communication in browsers that support it (FF3, Safari 4, IE8), while falling back to a document.location.hash communication method for all other browsers (IE6, IE7, Opera).
jQuery replaceText will replace text in specified elements. Note that only text content will be modified, leaving all tags and attributes untouched.
With jQuery resize event, you can now bind resize event handlers to elements other than window, for super-awesome-resizing-greatness!
With jQuery Star Wipe you can enable the single best transition ever created, the star wipe, in any recent WebKit browser!
jQuery throttle / debounce allows you to rate-limit your functions in multiple useful ways. Passing a delay and callback to
$.throttle returns a new function that will execute no more than once every
delay milliseconds. Passing a delay and callback to
$.debounce returns a new function that will execute only once, coalescing multiple sequential calls into a single execution at either the very beginning or end.
jQuery Untils provides three very simple, but very useful methods: nextUntil, prevUntil, and parentsUntil. These methods are based on their nextAll, prevAll, and parents counterparts, except that they allow you to stop when a certain selector is reached. Elements are returned in “traversal order”.
jQuery urlInternal allows you to easily test internal-, external-, or fragment-ness for any relative or absolute URL. Includes element filtering methods and pseudo-selectors.
This plugin and the jQuery BBQ plugin supersede the URL Utils plugin.
While many articles have been written explaining how multiple versions of Firefox can run concurrently by launching Firefox with version-specific profiles via command-line argument, this very simple AppleScript aims to greatly streamline the process. Basically, once configured, you never again have to choose which profile goes with which version of Firefox. Just run the launcher and it handles everything!
This AppleScript does exactly what it says, which is allow you to view source from Safari in TextMate. Since it uses a temporary file to store the page source, TextMate won’t ask if you’d like to save when you close the window. And since it tries to guess the correct filename extension to use, the correct syntax highlighter should be chosen automatically.
Simplified is a WebKit message style for the popular OS X Linkinus IRC application. While developed independently of the Linkinus app, great effort was spent working with the app development team to not only tailor Simplified to it, but to also enhance the app style API for Simplified and other message styles. As a result, the Simplified source is modular and well-organized, and style authors are encouraged to use Simplified as a framework for building their own styles.