Simon Willison’s Weblog

Subscribe
Atom feed for javascript

689 items tagged “javascript”

2008

husk.org. a flickr machine tag browser (via) Flickr recently added API methods for exploring the machine tags used by the community. Paul Mison has built a neat OS X Finder style interface for exploring them, using JSONP and jQuery.

# 15th December 2008, 11:24 pm / json, jsonp, jquery, javascript, flickr, machinetags, paul-mison

Visual Event. External code loading bookmarklet that visualises the JavaScript events hooked up to the current page, and lets you view the source code of the event handling function for each one. Only works for events added by jQuery, YUI or MooTools since those libraries maintain a cache of event handlers that they add, to work around the standard DOM’s omission of handler introspection.

# 10th December 2008, 3:38 pm / events, javascript, allan-jardine, bookmarklet, dom, jquery, mootools, visualevent, yui

Internet explorer mystery #1376. IE executes function definitions inside an “if (0)” block. That frightens me.

# 3rd December 2008, 9:04 am / ned-batchelder, internet-explorer, javascript

lightningtimer.net. I’m fed up of having to dig out or knock up a timer script every time I manage lightning talks, so I’ve given one a domain name. You can use lightningtimer.net/#90 to set a different start time for the counter.

# 12th November 2008, 4:43 pm / lightningtimer, projects, javascript, lightningtalks

Introducing Acre. I’m losing track of all the server-side JavaScript hosted web application platforms now. Here’s the Freebase contribution to the genre, complete with IDE, templating language and strong integration with Freebase itself.

# 7th November 2008, 11:23 pm / javascript, freebase, acre, serversidejavascript

jQuery history plugin. I used this plugin to add back button support to a small Ajax app today, with great results. I tried it a while ago and it didn’t work in Safari, but someone has updated it since and now it works perfectly.

# 7th November 2008, 5:32 pm / jquery, history, ajax, javascript, plugins, backbutton

Yahoo, Caja, OpenSocial. Yahoo!’s new application platform uses OpenSocial, and protects itself from malicious JavaScript using Google’s Caja secure JavaScript engine. I hadn’t realised that Caja was ready for production use—this is excellent news.

# 30th October 2008, 5:14 pm / caja, yahoo, opensocial, javascript, security

JSSpeccy. A ZX Spectrum emulator written in Javascript.

# 29th October 2008, 5:25 pm / emulator, canvas, matt-westcott, javascript, jsspeccy, spectrum, zxspectrum

I'm really typecasting myself here. If there were an international "Person most likely to write a Spectrum emulator in Javascript" award, I'd have taken it for the last five years running.

Matt Westcott

# 29th October 2008, 5:24 pm / matt-westcott, jsspeccy, javascript

typeface.js. Outstanding hack—renders custom fonts using VML in IE and canvas in everything else, using fonts that are defined as a set of vector paths stored using JSON.

# 27th October 2008, 11:45 pm / fonts, typefacejs, canvas, javascript, json, vml, typography

Freebase Hack Day. I’m finding Freebase increasingly interesting at the moment, and their public hack day on the 8th November in San Francisco looks like it could be a lot of fun. They’ll be previewing Acre, a new server-side JavaScript application platform targeted at building Freebase powered applications. Hit “view source” at the bottom of the hack day site to see what an Acre app looks like.

# 24th October 2008, 12:06 am / hackday, freebase, acre, events, javascript, san-francisco

CSSHttpRequest (via) Devious cross-domain Ajax hack that uses CSS for transport (@import rules with data URIs, but it still works in IE). Similar to JSONP but safer, since JSONP can cause arbitrary JavaScript to execute.

# 23rd October 2008, 6:25 pm / json, jsonp, javascript, ajax, crossdomain, css, atimport, csshttprequest

FriendFeed launch a real-time API. This is huge: JSONP plus long polling Comet, with “everything since X” tokens to ensure you don’t miss anything. This is the first open Comet API I’ve seen anywhere. Combine this with FriendFeed’s regular API (which allows arbitrary message posting) and you’ve got a really powerful tool for hackers who want to experiment with Comet without rigging up their own infrastructure.

# 22nd October 2008, 2:18 pm / comet, friendfeed, realtime, apis, json, jsonp, javascript

Private Messages with cometD Chat. cometd-java (a Java servlet reference implementation of the Bayeux protocol) can be extended with BayeuxService subclasses that run within the server itself.

# 16th October 2008, 2:14 pm / comet, cometd, javascript, cometdjava, bayeux, java

Page Inlink Analyzer (via) Here’s why I’m so keen on JSONP APIs—Eric Miraglia’s tool fires off dozens of cross-domain JSON requests to pull together information about inbound links to your site from Yahoo! Site Explorer and del.icio.us. I imagine it would have been uneconomic for him to provide the tool if it had to proxy every request through his own server.

# 15th October 2008, 5:23 pm / jsonp, eric-miraglia, json, javascript, apis, delicious

Browser Paint Events. The latest Firefox nightlies include a new MozAfterPaint event which fires after a portion of the page has been redrawn and provides co-ordinates of the affected rectangle. John Resig provides a neat bookmarklet that uses the new event to visualise repainting operations.

# 14th October 2008, 1:08 pm / mozafterpaint, mozilla, javascript, firefox, john-resig

Antisocial. Matt Westcott (a.k.a. Gasman) provides some technical background to his awesome Antisocial 3D canvas demo.

# 9th October 2008, 6:42 pm / javascript, canvas, 3d, demoscene, matt-westcott, gasman

Antisocial: a Javascript demo by Gasman. The demo is cool (3D on top of canvas); the “demotool” editor is simply amazing.

# 8th October 2008, 3 pm / demo, demotool, gasman, matt-westcott, antisocial, 3d, canvas, javascript

Dealing with UI redress vulnerabilities inherent to the current web (via) The best explanation of clickjacking I’ve seen yet, complete with discussion of a number of non-ideal potential solutions. It looks like frame busting JavaScript will defeat it, but only for users who have JavaScript enabled—which means that in this case extensions like NoScript actually make you less safe. UPDATE: NoScript is smarter than I thought; see the comments.

# 7th October 2008, 9:59 am / javascript, noscript, clickjacking, security

Tweetersation. Nat and my latest side project: a JSONP API powered tool to more easily follow conversations between people on Twitter, by combining their tweets in to a single timeline.

# 2nd October 2008, 5:08 pm / twitter, jsonp, projects, natalie-downe, javascript, api, tweetersation

Google’s Wikipedia and Panoramio layers are now available in the API. I really like their use of reverse domain style identifiers for the layer IDs: map.addOverlay(new GLayer(“org.wikipedia”));

# 2nd October 2008, 11:59 am / google-maps, wikipedia, javascript, panoramio, glayer

freebase-suggest (via) A jQuery plugin that performs auto-completion against the Freebase JSONP API, and allows the results to be limited to specific categories or subsets.

# 24th September 2008, 11:58 pm / autocomplete, freebasesuggest, freebase, javascript, jquery, metadata, jsonp

Secure mashups with dojox.secure (via) dojox.secure is brilliant and terrifying at the same time. It provides a full featured API for running untrusted JavaScript in a sandbox, by parsing and validating that code against a variant of Douglas Crockford’s ADsafe JavaScript subset. It could be fantastically useful, but it’s difficult to judge how secure this approach really is.

# 24th September 2008, 4:08 pm / dojox, dojo, javascript, security, sandboxing, adsafe, kriszyp, dojoxsecure, mashups

When Ajax Attacks! Web application security fundamentals. Slides and notes from my talk on web application security at @media Ajax last Tuesday.

# 20th September 2008, 4:16 pm / atmediaajax, atmediaajax2008, security, csrf, xss, presentations, slides, ajax, javascript

Frame-Busting Gadgets. I’ve always been slightly suspicious of the Google Gadgets / OpenSocial idea of sandboxing untrusted third party content in an iframe. Sure enough, it turns out iframe busting scripts work in Gadgets, meaning a seemingly harmless gadget could potentially launch a phishing attack.

# 17th September 2008, 11:23 pm / framebusting, security, gadgets, opensocial, javascript, phishing

When Ajax Attacks! Web application security fundamentals. Slides and (other people’s) notes from my presentation at @media Ajax on Tuesday.

# 17th September 2008, 11:18 pm / ajax, atmediaajax, atmediaajax08, csrf, javascript, security, speaking, xss, recovered

Gearshift. Whoa, a full migrations library written in JavaScript for Gears (which uses SQLite for its data store).

# 15th September 2008, 2:51 pm / sqlite, gears, google-gears, javascript, migrations, gearshift

Prototype based programming in python. Neat implementation of JavaScript-style prototype inheritance in Python.

# 11th September 2008, 5:50 pm / python, javascript, prototype

Dromaeo: JavaScript Performance Testing (via) This is one classy benchmark. Run it in as many browsers as you like (each run is saved to the server and assigned a run ID), then compare the results by appending ?id=[run1],[run2]... to the URL.

# 11th September 2008, 4:06 pm / benchmark, john-resig, dromaeo, javascript, performance

Cappuccino Web Framework. Now open source (LGPL)—the Objective-C-in-JavaScript web application toolkit from 280 North, who are speaking at this year’s FOWA in October. Beautiful logo.

# 5th September 2008, 3:27 pm / open-source, lgpl, javascript, objectivej, cappuccino