Chrome Declare Permissions

ワイルドカードでパーミッションの権限を与えます。”permissions”: [“tabs”, “http://*/*”,”https://*/*”],

{
  "manifest_version": 2,
  "name": "My Extension",
  "version": "0.1",

	"description": "背景色変更",

	"permissions": ["tabs", "http://*/*","https://*/*"],


	"browser_action":{
          "default_title": "Chrom Extension",      // optional; shown in tooltip
          "default_popup": "popup.html"
	}
}
function changeColor(color){
	chrome.tabs.executeScript(null, {
		"code": "document.body.style.backgroundColor='"+color+"'"
	});
}

document.getElementById('red').onclick = function(){
	changeColor('red');
}

document.getElementById('yellow').onclick = function(){
	changeColor('yellow');
}