Closurizing the extension.js