Chrome Extensionã®package.jsonãWebExtensionã«å¯¾å¿ããããã«å¤æãã¦ãããã³ãã³ãä½ã£ããFirefoxããµãã¼ãæ¸ã®APIã®ã¿ãå©ç¨ãã¦ãããªããããã§å¤æããã°åãããã«ãªãã¯ã https://t.co/leu3lEEmwo
— ç¹å¥ã«ãªã太é (@pastak) February 6, 2016
Firefox46 ã Developer Edition ã¨ãã¦ãªãªã¼ã¹ããã¾ããã WebExtensionã¯Firefox46ã§alpha stateã¨ãããã¨ã«ãªã£ã¦ãã¾ãã
ãã®ã¾ã¾é 調ã«è¡ãã°ã 2016-08-02ã«ãªãªã¼ã¹ãããäºå®ã®*1Firefox48ã§stable releaseã«ãªãã¾ãã
ã¾ãä¸è¨ããã°è¨äºã§ã触ãããã¦ãã¾ããã addons.mozilla.org (AMO) ã«ã¢ãããã¼ããã¦ç½²åããããã¨ãåºæ¥ãããã«ãªã£ã¦ãã¾ãã
å æ¥ãWebExtension現状確認してみた - Pastalablog in はてなã¨ããè¨äºãæ¸ãã¦ç¾ç¶ã確èªãã¾ãããæè¿ã¾ã§çµæ§å¤§ããã®ãã°*2ããã£ã¦ãåãããExtensionãããªãã·ã³ãã«ãªãã®ã ãã ã£ãã®ã§ãããå æ¥ããã解æ¶ããã¦ããªãã®æ°ã®Extensionãåãããã«ãªã£ã¦ãã¾ãã
åãããã«ã¯å ·ä½çã«ã¯ãã®2ã¤ã®ãã¨ãè¡ãå¿ è¦ãããã¾ãã
- æªå®è£ JavaScript APIã®å©ç¨ãé¿ãã
- manifest.jsonã®æ¸ãæã
ã¨è¨ã£ã¦ã2ã¤ã¨ã Chrome incompatibilities - Mozilla | MDN ã«Chromeã¨ã®å·®åãæ¸ããã¦ããã®ã§ãããã«æ¸ããã¦ããéãã«ããã°OKã§ãã
ä»åä½ã£ãwemf
ã¨ããã³ãã³ãã©ã¤ã³ãã¼ã«*3ã¯ãä¸è¨ã®ä½æ¥ã®ãã¡ã®manifest.jsonã®æ¸ãæãä½æ¥ãã·ã¥ãã¨ãã£ã¦ããããã¼ã«ã§ãã
ãã£ã¦ããããã¨ã¯ä»¥ä¸ã®ãã¨ã§ãã
- å¿
ãå«ã¾ãã¦ããã¹ããã¼ã¨å¯¾å¿ããå¤ã追å
- ä¸è¶³ãã¦ãããã¼ãããå ´å㯠package.json ãªã©ããçæãã¤ã¤ã対話ã¤ã³ã¿ã¼ãã§ã¤ã¹ã§çæãã¾ã
- æªå¯¾å¿ã®ãã¼ãåé¤
- ç¾ç¶æªå¯¾å¿ã®ãã¼ãããã¨ã¤ã³ã¹ãã¼ã«ã«å¤±æããã®ã§ããã®ãããªãã¼ãåé¤ãã¾ãã
- æªå¯¾å¿ã®ãã¼ã¯ã¼ãã®ä½¿ç¨ãéç¥
web_accessible_resources
ã§ã¯ã¤ã«ãã«ã¼ãã使ããªããªã©ãããã®ã§ããã®ãããªãã¼ã¯ã¼ããå«ãã§ããå ´åã¯åé¤ããã«éç¥ãã¾ãã
% npm install -g wemf
ã§ã¤ã³ã¹ãã¼ã«ãã% wemf /dir/chrome-ext/package.json -O /dir/firefox-ext/package.json
ã§å¤æãããã®ãåºåãã¦ããã¾ãã
ã¾ãã--validate
ãªãã·ã§ã³ãå©ç¨ãããã¨ã§manifest.jsonã®ç°¡åãªããªãã¼ã·ã§ã³ãã§ãã¯ãåºæ¥ã¾ããï¼å³å¯ãªå¤ã®ãã§ãã¯ãªã©ãããã®ã§ã¯ãªããæªå¯¾å¿ã®ãã¼ãå«ãã§ããªãããªã©ããã§ãã¯ããã ãã§ãï¼
詳ãã使ãæ¹ã¯ãªãã¸ããªã®READMEã--help
ãªã©ãè¦ã¦ãã ããã
ã¡ãªã¿ã«ä»ã®v0.2.1
ã¯2015-02-06 (JST) æç¹ã§manifest.json - Mozilla | MDN ã«æ¸ããã¦ããæ
å ±ãåºã«å®è£
ãã¦ãã¾ãã
ä½ãæ´æ°ãããã°æ¥µå追éããã¤ããã§ãããä½ãããã°PRããã ããã
ã©ãããå©ç¨ãã ããã
*1:https://wiki.mozilla.org/RapidRelease/Calendar
*2:https://bugzilla.mozilla.org/show_bug.cgi?id=1208257 ChromeExtensionã®ããã¥ã¡ã³ãã§optionalã«ãªã£ã¦ããå¼æ°ã解éåºæ¥ãªãã¨ãããã°
*3:åå㯠WebExtension Manifest Formatterã®ç¥ã§ã