Protecting the extension from erroring out with Javascript.