LoginSignup
0
1

More than 5 years have passed since last update.

Chroe Extension開発サンプル

Last updated at Posted at 2019-03-24

Chrome Extension

クロームエクステンション開発の初めの一歩として、以下の公式ページを実践しました。
developer.chrome.com/extensions

資源のダウンロード

サンプルの素材が置いてあるページからダウンロードします。

manifest.json
{
  "name": "Hello Extensions",
  "description" : "Base Level Extension",
  "version": "1.0",
  "browser_action": {
    "default_popup": "hello.html",
    "default_icon": "hello_extensions.png"
  },
  "manifest_version": 2,
  "commands": {
    "_execute_browser_action": {
      "suggested_key": {
        "default": "Ctrl+Shift+F",
        "mac": "MacCtrl+Shift+F"
      },
      "description": "Opens hello.html"
    }
  }
}
hello.html
<!DOCTYPE html>
<html>
  <head>
    <title> Hello Extensions </title>
  </head>

  <body>
    <h1>Hello Extensions</h1>
  </body>
</html>

hello_extensions.pngもあります。

拡張機能を有効にする

以下にアクセスし、パッケージ化されていない拡張機能を有効にするを押し、フォルダを指定する
chrome://extensions/

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1