The HTML5 Boilerplate build script can auto generate your manifest.appcache file but it doesn’t out of the box. Slightly hidden away in the docs: To enable the appcache, just uncomment the file.manifest line in the project.properties file. It’ll create a manifest.appcache file and wire it all up. You’ll find the project.properties file in build/project. Now just do ant […]
A cool and little known JavaScript function is .link() available to all string objects. Calling string.link(url) returns an HTML string for an anchor tag with the URL in it. For example: var text = ‘the best website ever’; var html = text.link(‘http://bencollier.net/’); html === “<a href=‘http://bencollier.net/’>the best website ever</a>” //true A great way […]
To check if an object is empty in Javascript: Object.getOwnPropertyNames(obj).length === 0; Where obj is the object you’re testing e.g.: var obj = {}; Object.getOwnPropertyNames(obj).length === 0; //true obj = {‘not’ : ‘empty’}; Object.getOwnPropertyNames(obj).length === 0; //false Or to wrap it in a function: function isEmpty(obj){ return (Object.getOwnPropertyNames(obj).length === 0); } […]
The winner of the 2011 Yahoo HackU contest at University of Washington, this is so cool. Click here to activate the Katamari Damacy effect. You can also install it as a bookmarklet by dragging: Katamari to your bookmarks bar. It uses CSS3 transforms and html5 canvas to do this awesome effect. Hats off to the developers, this works […]
Chrome 9 instant search: With Chrome Instant (à la Google Instant), web pages that you frequently visit will begin loading as soon as you start typing the URL. (“Look, Mom — no enter key!”). If supported by your default search engine, search results appear instantly as you type queries in the omnibox. To try out Instant, you’ll need […]
Somewhat hypnotic generative drawing website that uses HTML5 canvas and lots of pretty colours. It records your drawings to share with others –http://weavesilk.com/?l1
Currently only works in Safari 5 & Chrome 7 dev, but this Wonder Wall Demo is extremely awesome!
Unicorn — Universal Website Validator is a nice new validator tool from the W3C that runs their suite of tests on your site, checking for accessibility and standards compliance. Try it out for this site! — lots of CSS errors due to my use of vendor specific prefixes, which I personally think, used with caution, should be […]