rewrite for Firefox add-on