Community, Course & Activity
  • Introduction
  • Chapter1: Security
    • 資訊安全:從入門到差點入獄
    • 一次搞懂DDOS是什麼
  • Chapter2: AI
    • 機器人、人工智慧、數據分析於生產線的應用
  • Chapter3: Product
    • 從創意到產品:遊戲化(Gamification)的創作歷程
  • Chapter4: Big Data
    • 3月樂活體驗 --- Cloudera + HareDB 打造企業大數據平台
  • Chapter 5: Maker
    • 【Maker Hatch Night】從研究到實作,Maker也來玩AI!
  • Chapter6: Web
    • WebExtensions 初學動手做 - 第一次寫跨瀏覽器擴充套件就上手
    • WebGL&WebVR #04 meetup: WebVR update in 2017
    • 淺談WAF在AWS的架構
  • Chapter7: StartUp
    • mit.Jobs Talk #4 - 熱情、勇氣與策略 我如何找到 Airbnb 夢幻工作
  • Chapter8: VR
    • 虛擬實境 技術與市場洞察面面觀
  • Chapter9: Entertainment
    • 影視娛樂產業與智慧財產權
  • Chapter10: ART
    • 藝術講座*《前進藝術玩拍賣》藝步簡單上手
Powered by GitBook
On this page

Was this helpful?

  1. Chapter6: Web

WebExtensions 初學動手做 - 第一次寫跨瀏覽器擴充套件就上手

PreviousChapter6: WebNextWebGL&WebVR #04 meetup: WebVR update in 2017

Last updated 5 years ago

Was this helpful?

  • 講者

    • Ett Chung /ettoolong

  • 活動共筆

  • 簡報

  • 內容

    • 使用工具:

    • Mozilla

      • 跨瀏覽器

    • Firefox add-on

      • Legacy extension (XUL overlay)

      • Jetpack/ add-on SDK (無需重啟)

      • webextension

        • firefox 57 -> 停止前兩個架構

    • Electrolysis (e10s)

      • multiprocess firefox

      • background.js

      • content script

      • page script

    • web-ext

      • 安裝web-ext (for mac)

        sudo npm install web-ext -g

      • web-ext run

        web-ext run -f="/Applications/FirefoxDeveloperEdition.app" -p="dev-edition-default"
        --no-reload
        • open Tools > Web Developer > Browser Console to see logging

        • See the console log

      • web-ext build: build成zip檔

      • web-ext sign:

    • Chrome

      • 手動載入

        • chrome://extensions

    • Example:

      • 1.git clone

      • 2.cd to folder

      • 3.web-ext run -f="/Applications/FirefoxDeveloperEdition.app" -p="dev-edition-default"

    • APIs

      • webextendsion API

      • web API

    • manifest.json

      • 描述, 版號, 名稱等資訊

      • permission

    • background.js

    • content script

      • 僅能存取部分webextension API

      • manifest.json -> content_scripts

    • debugging

    • broswer action

      • 在瀏覽器上加一個icon, 點擊後觸發

    • page action

      • 在特定頁面才會生效

    • Context menu (copy_plain_text_1)

      • 在瀏覽器上按右鍵出現的選單_page

    • Option_ui (copy_plain_text_2)

      • 讓使用者調整設定值

      • page

      • open_in_tab

      • customize

    • Localization (多國語言)(copy_plain_text_3)

    • Embedded webExtensions

      • migrate to webExtension

簡報
Source code
Firefox Developer Edition
MozTW
hello_world
about:debugging