JavaScript MD5

var MD5 = function (string) {

   function RotateLeft(lValue, iShiftBits) {
           return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits));
   }

   function AddUnsigned(lX,lY) {
           var lX4,lY4,lX8,lY8,lResult;
           lX8 = (lX & 0x80000000);
           lY8 = (lY & 0x80000000);
           lX4 = (lX & 0x40000000);
           lY4 = (lY & 0x40000000);
           
Avatar of Chris Coyier
Chris Coyier on

WebKit Gradient Syntax

Direct Link

… is now the same as the Mozilla / Official spec version, which is great because 1) it’s easier to write and technically more powerful and 2) yay standards!

It’s only in the WebKit nightlies, but I’m sure will be …

Avatar of Chris Coyier
Shared by Chris Coyier on

Google Dropping H.264

Direct Link

Google Chrome is dropping support for the video codec H.264. Kinda feels like an Apple vs. Google pissing match as H.264 is so heavily used by Apple and WebM was developed by Google.

For HTML5 video, this is how it …

Avatar of Chris Coyier
Shared by Chris Coyier on

What’s the Difference?

Reader Paul writes in:

What’s the difference between .container div { } and div.container { }?

It’s great you are asking questions like this Paul. The answer is very important to understanding CSS, because these two selectors select very …

Avatar of Chris Coyier
Chris Coyier on

Moving Highlight

I recently noticed a subtle and nice effect in the Google Chrome UI. As you mouse over inactive tabs, they light up a bit, but also have a gradient highlight that follows your mouse as you move around on them. …

Avatar of Chris Coyier
Chris Coyier on

Fix Select Dropdown Cutoff in IE 7

Run (at least the “Usage” part below) after you’ve loaded jQuery and either at the end of the page or in a DOM ready statement. Note that this fix does create a clone of the select, which will submit itself …

Avatar of Chris Coyier
Chris Coyier on

Customize Login Page

You know, the one typically at yoursite.com/wp-login.php. These are things you would put in the active theme’s functions.php file.

Change the Logo

Is the WordPress logo by default, this changes the file path of that image. Change file path and …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Mother Effing HSL

Direct Link

From the source code:

this site is by Paul Irish
i made it cuz hsla is wayyyy cooler than rgba and more sensible too!

HSL is better than RGB. The reason it isn’t used as much (according to me) is …

Avatar of Chris Coyier
Shared by Chris Coyier on

Links

Got a couple of slightly-oldie-but-goodies for you:

  • A jQuery plugin by Manos Malihutsakis which allows you do to create custom scrollbars for content areas that do some neat things like move their position and size, style them differently, and use
Avatar of Chris Coyier
Chris Coyier on