Projects


Javascript Diff Algorithm

Using an idea grabbed from a mailing list post, I implemented the diff algorithm discussed in the following paper (free registration required):

P. Heckel, A technique for isolating differences between files
Comm. ACM, 21, (4), 264--268 (1978).

The implementation, itself, has two functions, one of which is recommended for use:

diffString( String oldFile, String newFile )
This method takes two strings and calculates the differences in each. The final result is the 'newFile' marked up with HTML (to signify both deletions from the oldFile and additions to the newFile).

Sample Code

document.body.innerHTML = diffString(
   "The red brown fox jumped over the rolling log.",
   "The brown spotted fox leaped over the rolling log"
);

Sample Output

The red brown spotted fox jumped leaped over the rolling log.

Projects Using this Code:

Downloads

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License.

Tags: algorithm, diff, javascript, papers, cool, popular

AniWiki

This is my entry into the Waxy.org Automated Wikipedia Contest. There's still a number of bugs to squish, but I'm working on them. A summary of the features:

Download

  • AniWiki.user.js - This is a greasemonkey script. To use, you must be using Mozilla or Firefox and have the Greasemonkey extension installed (version 0.33, minimum).

Tags: wiki, wikipedia, javascript, animation, cool, popular

Del.icio.us Auto-Complete

A Greasemonkey extension that adds tag auto-complete capabilities to the traditional del.icio.us posting areas. This is a powerful extension which can greatly increase your del.icio.us posting speed. I've spent some time playing around with it, thus far, and it's been helping me out significantly.

The premise behind this extension is that it goes through your existing 'Post' page, takes the tag data from within the page and gives you auto-completion capabilites of it. This is how the current interfaces are supported:

  • The traditional posting interface (Screenshot) is fully supported. Additionally, the tags are also sorted by popularity.
  • The 'experimental' interface (Screenshot) is supported, but tag results are sorted alphabetically.
  • The popup posting interface is currently not supported as it does not contain any tag data.

It appears that another auto-complete hack was done a while back, but no longer exists. After doing some more digging around I was able to find an implementation of that specific piece of code. Upon inspection, however, it appears as if all tag data is hard-coded into the javascript (which is highly inefficient).

Features

  • Tag Auto-Completion
  • Sorting by popularity (Traditional interface only).
  • Tags can be completed using the right arrow, tab, enter, or escape keys.
  • To view alternate tag suggestions, hit the 'up' or 'down' arrow.

Known Bugs

  • Will only complete the last tag being entered (not tags in the middle of the text area).
  • Sometimes if you type really fast it will complete the tag automatically.

Updates

  • Version 3 (2005-03-27): Any non-space character is valid in a tag.
  • Version 2 (2005-03-26): Is now capitalization agnostic. You can type in both upper and lower case and auto-complete words which are both upper and lower case.
  • Version 1 (2005-03-25): Initial release.

Downloads

Tags: javascript, greasemonkey, delicious, tags, popular, cool

FOAF Layout

Bob Aman contacted me recently wondering if I could create a simple, sexy, FOAF layout for one of his personal projects. I tinkered around and came up with one that I like, in a variety of sizes and shapes. (It even has the ability to expand/contract via Javascript). I may eventually use a version of this for the upcoming Schedule Maker, but that remains to be seen.

Links

Downloads

Tags: css, design, javascript

name2face

A rough framework for attaching someone's picture to their name, using Greasemonkey. More information concerning why I constructed this script can be found in this blog post: Visual Friend Identification. The data, itself, is currently embedded into the script, which is rather annoying. Eventually it would be nice to have the data stored someplace that is easily reachable by the script and easily updated by the user (maybe through a context menu?). It's really just more of a proof-of-concept at this point.

Download

Tags: greasemonkey, javascript

DOM Snap

This is a modification of Younpup's Dom-Drag which adds 'snapping' functionality to DOM objects. For example, if a user moves an object close to the edge of another object, it will 'attach' and remain connected until broken free. Anyone familiar with Winamp will recognize this functionality. I'm still in the process of cleaning up the code, and once it's done, I'll release a proper package for it.

Links

Tags: javascript, dom, dhtml, cool

dModeler - DHTML UML Modeler

A web-based UML modeling program that my team wrote for the 4th Red Bull Programming competition. We weren't able to complete all that much of it, but we did get creation of classes, links, drawing, signups, logins, and parameter creation finished. At some point it may be fun to sit down and modify what we wrote and get it fully operational and possibly release it.

Links

Tags: competition, databases, dhtml, javascript, perl, xml

DeliciousGator

A GreaseMonkey plug-in that replaces the 'Forward post via e-mail' option in favor of a del.icio.us submission link, on News Gator Online.

Downloads

  • Install DeliciousGator - Currently, you have to download the script and edit the variable 'user' to point to your own del.icio.us username, not mine. Hopefully there will be an easier way to do this in the future. You must have the GreaseMonkey extension installed in Firefox

Tags: browsers:firefox, greasemonkey, javascript

Next entries » · « Previous entries

Current Projects

jQuery JavaScript Library

jQuery

Comprehensive DOM, Event, Animation, and Ajax JavaScript Library.

Recent Projects

Pro JavaScript Techniques

JavaScript Book

The best techniques for professional JavaScript. Published by Apress.


Hosting provided by the cool dudes at Engine Yard.