4
4

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 5 years have passed since last update.

Google Chrome Extensionsのmanifest.jsonテンプレート

Posted at

manifest file formatは量が多すぎなので、よく使うGoogle Chrome Extensionsでよく使うmanifest.jsonの書式だけピックアップ。

background pageばっかり使ってるとGoogle Chromeのメモリをガシガシ消費するだけなので、event pageを使うように心がけよう。
background便利だけどね。

manifest.json
{
	"manifest_version": 2,
	"name": "extensions name",
	"version": "extensions version",
	"default_locale": "ja",
	"description": "extensions description",
	"permissions": [
		"tabs",
		"webRequest",
		"*://*/*"
	],
	"background": {
		"page": ["background.html"],
		"scripts": ["background.js"],
		"persistent": false
	},
	"content_scripts": [
		{
		  "matches": ["http://*/*", "https://*/*"],
		  "js": ["contentscripts.js"],
		  "css": ["contentscript.css"],
		  "all_frames": true,
		  "run_at": "document_end"
		}
	],
	"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self';",
	"browser_action": {...},
	"page_action": {...}
}

Manifest File Format

4
4
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
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?