{"id":5062,"date":"2022-06-02T21:08:19","date_gmt":"2022-06-02T12:08:19","guid":{"rendered":"https:\/\/okamurax.com\/?p=5062"},"modified":"2022-06-03T02:00:31","modified_gmt":"2022-06-02T17:00:31","slug":"chrome%e6%8b%a1%e5%bc%b5%e6%a9%9f%e8%83%bd-%e5%8f%b3%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e3%81%8b%e3%82%89%e6%a4%9c%e7%b4%a2","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=5062","title":{"rendered":"Chrome\u62e1\u5f35\u6a5f\u80fd \u53f3\u30af\u30ea\u30c3\u30af\u304b\u3089\u691c\u7d22"},"content":{"rendered":"<p>\u9078\u629e\u3057\u305f\u6587\u5b57\u5217\u3092\u30d6\u30ed\u30b0\u691c\u7d22<\/p>\n<pre class=\"lang:default decode:true \">{\r\n  \"manifest_version\": 3,\r\n  \"name\": \"RightClick\",\r\n  \"version\": \"0.0.2\",\r\n  \"background\": {\r\n    \"service_worker\": \"script.js\"\r\n  },\r\n  \"permissions\": [\r\n    \"tabs\",\r\n    \"contextMenus\"\r\n  ]\r\n}<\/pre>\n<pre class=\"lang:js decode:true \">chrome.runtime.onInstalled.addListener(function () {\r\n  chrome.contextMenus.create({\r\n    id: \"parent\",\r\n    title: \"\u30d6\u30ed\u30b0\u691c\u7d22\",\r\n    contexts: [\"selection\"]\r\n  });\r\n});\r\n\r\nchrome.contextMenus.onClicked.addListener((info) =&gt; {\r\n  if (info.menuItemId == \"parent\"){\r\n    let u = \"https:\/\/www.google.co.jp\/search?hl=ja&amp;as_sitesearch=http:\/\/okamurax.com\/&amp;q=\" + info.selectionText;\r\n    chrome.tabs.create({url:u});\r\n  }\r\n});\r\n<\/pre>\n<p>chrome.contextMenus.create\u306fonInstalled.addListener\u3067\u8ffd\u52a0\u3057\u306a\u3044\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002chrome.contextMenus.onClicked.addListener\u306f\u5165\u308c\u308b\u3068\u30c0\u30e1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9078\u629e\u3057\u305f\u6587\u5b57\u5217\u3092\u30d6\u30ed\u30b0\u691c\u7d22 { &#8220;manifest_version&#8221;: 3, &#8220;name&#8221;: &#8220;RightClick&#8221;, &#8220;version&#8221;: &#8220;0.0.2&#8221;, &#8220;background&#8221;: { &#8220;service_work &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=5062\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Chrome\u62e1\u5f35\u6a5f\u80fd \u53f3\u30af\u30ea\u30c3\u30af\u304b\u3089\u691c\u7d22&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[91],"class_list":["post-5062","post","type-post","status-publish","format-standard","hentry","category-1","tag-chrome"],"_links":{"self":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/5062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5062"}],"version-history":[{"count":5,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/5062\/revisions"}],"predecessor-version":[{"id":5068,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/5062\/revisions\/5068"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}