{"id":7855,"date":"2016-07-14T09:58:10","date_gmt":"2016-07-14T16:58:10","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=7855"},"modified":"2016-07-15T11:12:23","modified_gmt":"2016-07-15T18:12:23","slug":"webextensions-support-on-amo","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/","title":{"rendered":"WebExtensions support on AMO"},"content":{"rendered":"<p>It&#8217;s been possible to submit WebExtensions add-ons to <a href=\"https:\/\/addons.mozilla.org\">addons.mozilla.org<\/a> (AMO) <a href=\"https:\/\/blog.mozilla.org\/addons\/2016\/02\/02\/webextensions-in-firefox-46\/\">since February<\/a>, but I wanted to take a moment to highlight some of the improvements we\u2019ve made since then that make it much easier to get your Chrome or Opera add-on into AMO.<\/p>\n<p>These features have all been deployed to AMO over the last couple of months and are available for use.<\/p>\n<h3>New linter<\/h3>\n<p>We are now using the <a href=\"https:\/\/github.com\/mozilla\/addons-linter\">add-ons linter<\/a> for WebExtensions which means that when we parse a WebExtensions add-on, we are running through a new JavaScript-powered linter, instead of the Python one. This parsing occurs each time you upload a new add-on or a new version of an add-on.<\/p>\n<p>It uses <a href=\"https:\/\/github.com\/eslint\/eslint\">eslint<\/a> to parse the JavaScript and a <a href=\"https:\/\/github.com\/mozilla\/addons-linter\/pull\/751\">schema<\/a> to verify that the WebExtensions manifest is correct. Because we\u2019ve started to implement functionality in the new add-ons linter that didn\u2019t exist in the old version, more things will be showing up as warnings.<\/p>\n<p>As an example, if you request a permission in the manifest that Firefox doesn\u2019t support, you\u2019ll get a warning:<\/p>\n<p><a href=\"https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/image00.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7856\" src=\"https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/image00.png\" alt=\"image00\" width=\"959\" height=\"127\" srcset=\"https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/image00.png 959w, https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/image00-252x33.png 252w, https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/image00-768x102.png 768w, https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/image00-600x79.png 600w\" sizes=\"(max-width: 959px) 100vw, 959px\" \/><\/a><\/p>\n<h3>Relaxed upload criteria<\/h3>\n<p>If you\u2019ve developed and add-on for Chrome or Opera, we\u2019d like you to upload it to AMO. For this reason, we\u2019ve relaxed a few criteria around AMO. Once you\u2019ve verified that an add-on works correctly using <a href=\"https:\/\/blog.mozilla.org\/addons\/2016\/04\/29\/webextensions-in-firefox-48\/\">about:debugging<\/a>, you should then be able to upload it to AMO quite easily. We\u2019ve hopefully made this easier through the following steps:<\/p>\n<h4>Optional add-on id<\/h4>\n<p>If your WebExtension does not have an id specified in the manifest.json, then AMO will generate an id for your add-on and add it to the add-on signing process. You can then get the add-on id from AMO and re-use that in later API calls, if needed.<\/p>\n<p>The command line tool <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Getting_started_with_web-ext\">web-ext<\/a> also <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/web-ext_command_reference#--id\">supports optional ids<\/a>.<\/p>\n<h4>Uploads<\/h4>\n<p>AMO will now accept an add-on as a <code>zip<\/code> file or a <code>crx<\/code> file. It will still only emit <code>xpi<\/code> files that Firefox and other Mozilla projects can consume. In the case of a <code>crx<\/code> file, the extra data added by the Chrome store will be stripped out of the file.<\/p>\n<p>We recommend using a tool like <a href=\"https:\/\/developer.mozilla.org\/en-US\/Add-ons\/WebExtensions\/Getting_started_with_web-ext\">web-ext<\/a> to generate the appropriate file for your add-on.<\/p>\n<h4>Comments in the manifest file<\/h4>\n<p>Although comments are not valid in a JSON file, Chrome supports comments in the manifest.json file. To keep compatibility with Chrome, the addons-linter and hence AMO now support comments in the manifest file, but only comments starting with a double slash (\/\/).<\/p>\n<h3>Translations<\/h3>\n<p>Finally, AMO now supports translations in the manifest. This again follows the Chrome standard, so that:<\/p>\n<pre>\/\/in manifest.json:\r\n\"default_locale\": \"en\",\r\n\"name\": \"__MSG_appName__\",\r\n\r\n\/\/in _locales\/en\/messages.json:\r\n{\r\n  \"appName\": {\r\n    \"message\": \"My Add-on\",\r\n    \"description\": \"The name of the add-on.\"\r\n  }\r\n}\r\n\r\n\/\/in _locales\/de\/messages.json:\r\n{\r\n  \"appName\": {\r\n    \"message\": \"Mein Add-on\"\r\n  }\r\n}\r\n<\/pre>\n<p>The manifest will be parsed and the translations automatically entered into AMO. You need to ensure that <code>default_locale<\/code> is set in the manifest for the localisations to be activated. On the first upload, AMO will process the translations:<\/p>\n<p><a href=\"https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/Screenshot-2016-07-14-09.44.11.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7859\" src=\"https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/Screenshot-2016-07-14-09.44.11.png\" alt=\"Screenshot 2016-07-14 09.44.11\" width=\"1580\" height=\"352\" srcset=\"https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/Screenshot-2016-07-14-09.44.11.png 1580w, https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/Screenshot-2016-07-14-09.44.11-252x56.png 252w, https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/Screenshot-2016-07-14-09.44.11-768x171.png 768w, https:\/\/blog.mozilla.org\/addons\/files\/2016\/07\/Screenshot-2016-07-14-09.44.11-600x134.png 600w\" sizes=\"(max-width: 1580px) 100vw, 1580px\" \/><\/a><\/p>\n<p>If you\u2019d like to get involved then join our <a href=\"https:\/\/lists.mozilla.org\/listinfo\/dev-addons\">mailing list<\/a> or check out our <a href=\"https:\/\/github.com\/mozilla\/addons-server\/\">repositories on Github<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been possible to submit WebExtensions add-ons to addons.mozilla.org (AMO) since February, but I wanted to take a moment to highlight some of the improvements we\u2019ve made since then that &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/\">Read more<\/a><\/p>\n","protected":false},"author":271,"featured_media":7560,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,278886],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WebExtensions support on AMO - Mozilla Add-ons Community Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andy McKay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/\",\"name\":\"WebExtensions support on AMO - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2015\/09\/foxface_puzzle.jpg\",\"datePublished\":\"2016-07-14T16:58:10+00:00\",\"dateModified\":\"2016-07-15T18:12:23+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/#primaryimage\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/files\/2015\/09\/foxface_puzzle.jpg\",\"contentUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2015\/09\/foxface_puzzle.jpg\",\"width\":945,\"height\":922},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WebExtensions support on AMO\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/\",\"name\":\"Mozilla Add-ons Community Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8\",\"name\":\"Andy McKay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ad304e7a7d4f6fba05a81b10810fe6fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ad304e7a7d4f6fba05a81b10810fe6fd?s=96&d=mm&r=g\",\"caption\":\"Andy McKay\"},\"description\":\"Andy is an Engineering Manager at Mozilla. As a Canadian he tweets and blogs about curling, skiing, politics, maple syrup, bears and all things from the great white north.\",\"sameAs\":[\"http:\/\/mckay.pub\",\"https:\/\/x.com\/andymckay\"],\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/amckaymozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WebExtensions support on AMO - Mozilla Add-ons Community Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/","twitter_misc":{"Written by":"Andy McKay","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/","url":"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/","name":"WebExtensions support on AMO - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2015\/09\/foxface_puzzle.jpg","datePublished":"2016-07-14T16:58:10+00:00","dateModified":"2016-07-15T18:12:23+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/#primaryimage","url":"https:\/\/blog.mozilla.org\/addons\/files\/2015\/09\/foxface_puzzle.jpg","contentUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2015\/09\/foxface_puzzle.jpg","width":945,"height":922},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2016\/07\/14\/webextensions-support-on-amo\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"WebExtensions support on AMO"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/addons\/#website","url":"https:\/\/blog.mozilla.org\/addons\/","name":"Mozilla Add-ons Community Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/7e1881db0e8a23a4a06695f8a0efd6b8","name":"Andy McKay","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ad304e7a7d4f6fba05a81b10810fe6fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ad304e7a7d4f6fba05a81b10810fe6fd?s=96&d=mm&r=g","caption":"Andy McKay"},"description":"Andy is an Engineering Manager at Mozilla. As a Canadian he tweets and blogs about curling, skiing, politics, maple syrup, bears and all things from the great white north.","sameAs":["http:\/\/mckay.pub","https:\/\/x.com\/andymckay"],"url":"https:\/\/blog.mozilla.org\/addons\/author\/amckaymozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/7855"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/users\/271"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=7855"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/7855\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media\/7560"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=7855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=7855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=7855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}