ak.js: rewrite under Chrome