1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Chrome拡張機能でポップアップを表示させる方法

Last updated at Posted at 2020-03-18
フォルダ構造
フォルダ
 ├ manifest.json
 ├ popup.html
 └ icon.png
manifest.json
{
  "manifest_version": 2,
  "name": "name",
  "version": "1.0",

  "browser_action": {
    "default_icon": {
      "16": "icon.png"
    },
   "default_popup": "popup.html"
  }
}
popup.html
<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
</head>
<body>
  Hello World!
</body>
</html>

上記のフォルダを用意した後に拡張機能の画面でフォルダをD&Dすると自作の拡張機能を追加することが可能です。

2020-03-18_23h17_51.jpg

こちらを拡張機能が追加されると下記のようにそれぞれのmanifect.json
で設定した項目が表示されています。

図1.png

設定したアイコンが表示されていて、アイコンをクリックするとHello World!の文字が表示されます。

図1.png

【参考】
Chrome拡張の作り方

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?