{"action":"created","comment":{"url":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/comments/67008086","id":67008086,"diff_hunk":"@@ -0,0 +1,114 @@\n+package chrome.contextMenus.bindings\n+\n+import chrome.tabs.bindings.Tab\n+\n+import scala.scalajs.js\n+import scala.scalajs.js.annotation.{JSName, ScalaJSDefined}\n+import scala.scalajs.js.|\n+import scala.scalajs.js.JSConverters._\n+\n+object MenuContexts {\n+\n+  val ALL = \"all\"\n+  val PAGE = \"page\"\n+  val FRAME = \"frame\"\n+  val SELECTION = \"selection\"\n+  val LINKE = \"link\"\n+  val EDITABLE = \"editable\"\n+  val IMAGE = \"image\"\n+  val VIDEO = \"video\"\n+  val AUDIO = \"audio\"\n+  val LAUNCHER = \"launcher\"\n+  val BROWSER_ACTION = \"browser_action\"\n+  val PAGE_ACTION = \"page_action\"\n+}\n+\n+@js.native\n+@JSName(\"chrome.contextMenus\")\n+object ContextMenus extends js.Object{\n+\n+  def create(createProperties: CreateProperties): String | Int = js.native\n+\n+  def update(id: String | Int, properties: UpdateProperties): Unit = js.native\n+\n+  def remove(menuItemId: String | Int, callback: js.Function0[Unit]): String | Int = js.native\n+\n+  def removeAll(callback: js.Function0[Unit]): Unit = js.native\n+\n+}\n+\n+@js.native\n+@JSName(\"chrome.contextMenus.onClicked\")\n+object OnMenuClicked extends js.Object {\n+  def addListener(callback: js.Function2[MenuInfo, Tab, Unit]): Unit = js.native\n+}\n+\n+@ScalaJSDefined\n+class UpdateProperties(\n+                        val `type`: String = \"normal\", //\"normal\", \"checkbox\", \"radio\", or \"separator\"\n+                        val title: String,\n+                        val checked: js.UndefOr[Boolean] = js.undefined,\n+                        val contexts: js.Array[String] = js.Array(MenuContexts.ALL),","path":"bindings/src/main/scala/chrome/contextMenus/bindings/ContextMenus.scala","position":51,"original_position":51,"commit_id":"bc3a8e0f0051e05eac858e5cf30a0282a0387cb0","original_commit_id":"bc3a8e0f0051e05eac858e5cf30a0282a0387cb0","user":{"login":"lucidd","id":688888,"avatar_url":"https://avatars.githubusercontent.com/u/688888?v=3","gravatar_id":"","url":"https://api.github.com/users/lucidd","html_url":"https://github.com/lucidd","followers_url":"https://api.github.com/users/lucidd/followers","following_url":"https://api.github.com/users/lucidd/following{/other_user}","gists_url":"https://api.github.com/users/lucidd/gists{/gist_id}","starred_url":"https://api.github.com/users/lucidd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucidd/subscriptions","organizations_url":"https://api.github.com/users/lucidd/orgs","repos_url":"https://api.github.com/users/lucidd/repos","events_url":"https://api.github.com/users/lucidd/events{/privacy}","received_events_url":"https://api.github.com/users/lucidd/received_events","type":"User","site_admin":false},"body":"i have not checked all the properties but as a general rule of thump when something is marked `Optional` in the chrome documentation i make it `js.UndefOr` with the default value `js.undefined` to preserve the same behavior as the original js api.","created_at":"2016-06-14T16:41:08Z","updated_at":"2016-06-14T16:41:08Z","html_url":"https://github.com/lucidd/scala-js-chrome/pull/9#discussion_r67008086","pull_request_url":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/comments/67008086"},"html":{"href":"https://github.com/lucidd/scala-js-chrome/pull/9#discussion_r67008086"},"pull_request":{"href":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/9","id":73507891,"html_url":"https://github.com/lucidd/scala-js-chrome/pull/9","diff_url":"https://github.com/lucidd/scala-js-chrome/pull/9.diff","patch_url":"https://github.com/lucidd/scala-js-chrome/pull/9.patch","issue_url":"https://api.github.com/repos/lucidd/scala-js-chrome/issues/9","number":9,"state":"open","locked":false,"title":"added API for context menus","user":{"login":"antonkulaga","id":842436,"avatar_url":"https://avatars.githubusercontent.com/u/842436?v=3","gravatar_id":"","url":"https://api.github.com/users/antonkulaga","html_url":"https://github.com/antonkulaga","followers_url":"https://api.github.com/users/antonkulaga/followers","following_url":"https://api.github.com/users/antonkulaga/following{/other_user}","gists_url":"https://api.github.com/users/antonkulaga/gists{/gist_id}","starred_url":"https://api.github.com/users/antonkulaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonkulaga/subscriptions","organizations_url":"https://api.github.com/users/antonkulaga/orgs","repos_url":"https://api.github.com/users/antonkulaga/repos","events_url":"https://api.github.com/users/antonkulaga/events{/privacy}","received_events_url":"https://api.github.com/users/antonkulaga/received_events","type":"User","site_admin":false},"body":"I added context menus API","created_at":"2016-06-12T21:32:48Z","updated_at":"2016-06-14T16:41:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0c8b7f93288cdfce52da82a4bdb8b1b95c9b845","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/9/commits","review_comments_url":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/9/comments","review_comment_url":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lucidd/scala-js-chrome/issues/9/comments","statuses_url":"https://api.github.com/repos/lucidd/scala-js-chrome/statuses/bc3a8e0f0051e05eac858e5cf30a0282a0387cb0","head":{"label":"antonkulaga:context_menus","ref":"context_menus","sha":"bc3a8e0f0051e05eac858e5cf30a0282a0387cb0","user":{"login":"antonkulaga","id":842436,"avatar_url":"https://avatars.githubusercontent.com/u/842436?v=3","gravatar_id":"","url":"https://api.github.com/users/antonkulaga","html_url":"https://github.com/antonkulaga","followers_url":"https://api.github.com/users/antonkulaga/followers","following_url":"https://api.github.com/users/antonkulaga/following{/other_user}","gists_url":"https://api.github.com/users/antonkulaga/gists{/gist_id}","starred_url":"https://api.github.com/users/antonkulaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonkulaga/subscriptions","organizations_url":"https://api.github.com/users/antonkulaga/orgs","repos_url":"https://api.github.com/users/antonkulaga/repos","events_url":"https://api.github.com/users/antonkulaga/events{/privacy}","received_events_url":"https://api.github.com/users/antonkulaga/received_events","type":"User","site_admin":false},"repo":{"id":60636839,"name":"scala-js-chrome","full_name":"antonkulaga/scala-js-chrome","owner":{"login":"antonkulaga","id":842436,"avatar_url":"https://avatars.githubusercontent.com/u/842436?v=3","gravatar_id":"","url":"https://api.github.com/users/antonkulaga","html_url":"https://github.com/antonkulaga","followers_url":"https://api.github.com/users/antonkulaga/followers","following_url":"https://api.github.com/users/antonkulaga/following{/other_user}","gists_url":"https://api.github.com/users/antonkulaga/gists{/gist_id}","starred_url":"https://api.github.com/users/antonkulaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonkulaga/subscriptions","organizations_url":"https://api.github.com/users/antonkulaga/orgs","repos_url":"https://api.github.com/users/antonkulaga/repos","events_url":"https://api.github.com/users/antonkulaga/events{/privacy}","received_events_url":"https://api.github.com/users/antonkulaga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antonkulaga/scala-js-chrome","description":"ScalaJS bindings for Chrome Extention/App and ChromeOS APIs","fork":true,"url":"https://api.github.com/repos/antonkulaga/scala-js-chrome","forks_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/forks","keys_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/teams","hooks_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/hooks","issue_events_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/issues/events{/number}","events_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/events","assignees_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/assignees{/user}","branches_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/branches{/branch}","tags_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/tags","blobs_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/git/refs{/sha}","trees_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/statuses/{sha}","languages_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/languages","stargazers_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/stargazers","contributors_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/contributors","subscribers_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/subscribers","subscription_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/subscription","commits_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/commits{/sha}","git_commits_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/git/commits{/sha}","comments_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/comments{/number}","issue_comment_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/issues/comments{/number}","contents_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/contents/{+path}","compare_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/merges","archive_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/downloads","issues_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/issues{/number}","pulls_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/pulls{/number}","milestones_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/milestones{/number}","notifications_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/labels{/name}","releases_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/releases{/id}","deployments_url":"https://api.github.com/repos/antonkulaga/scala-js-chrome/deployments","created_at":"2016-06-07T18:32:23Z","updated_at":"2016-06-07T18:32:25Z","pushed_at":"2016-06-12T21:32:25Z","git_url":"git://github.com/antonkulaga/scala-js-chrome.git","ssh_url":"git@github.com:antonkulaga/scala-js-chrome.git","clone_url":"https://github.com/antonkulaga/scala-js-chrome.git","svn_url":"https://github.com/antonkulaga/scala-js-chrome","homepage":null,"size":164,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lucidd:master","ref":"master","sha":"11924472d1970c571a365412d234e860fdb3483e","user":{"login":"lucidd","id":688888,"avatar_url":"https://avatars.githubusercontent.com/u/688888?v=3","gravatar_id":"","url":"https://api.github.com/users/lucidd","html_url":"https://github.com/lucidd","followers_url":"https://api.github.com/users/lucidd/followers","following_url":"https://api.github.com/users/lucidd/following{/other_user}","gists_url":"https://api.github.com/users/lucidd/gists{/gist_id}","starred_url":"https://api.github.com/users/lucidd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucidd/subscriptions","organizations_url":"https://api.github.com/users/lucidd/orgs","repos_url":"https://api.github.com/users/lucidd/repos","events_url":"https://api.github.com/users/lucidd/events{/privacy}","received_events_url":"https://api.github.com/users/lucidd/received_events","type":"User","site_admin":false},"repo":{"id":28994144,"name":"scala-js-chrome","full_name":"lucidd/scala-js-chrome","owner":{"login":"lucidd","id":688888,"avatar_url":"https://avatars.githubusercontent.com/u/688888?v=3","gravatar_id":"","url":"https://api.github.com/users/lucidd","html_url":"https://github.com/lucidd","followers_url":"https://api.github.com/users/lucidd/followers","following_url":"https://api.github.com/users/lucidd/following{/other_user}","gists_url":"https://api.github.com/users/lucidd/gists{/gist_id}","starred_url":"https://api.github.com/users/lucidd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucidd/subscriptions","organizations_url":"https://api.github.com/users/lucidd/orgs","repos_url":"https://api.github.com/users/lucidd/repos","events_url":"https://api.github.com/users/lucidd/events{/privacy}","received_events_url":"https://api.github.com/users/lucidd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucidd/scala-js-chrome","description":"ScalaJS bindings for Chrome Extention/App and ChromeOS APIs","fork":false,"url":"https://api.github.com/repos/lucidd/scala-js-chrome","forks_url":"https://api.github.com/repos/lucidd/scala-js-chrome/forks","keys_url":"https://api.github.com/repos/lucidd/scala-js-chrome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucidd/scala-js-chrome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucidd/scala-js-chrome/teams","hooks_url":"https://api.github.com/repos/lucidd/scala-js-chrome/hooks","issue_events_url":"https://api.github.com/repos/lucidd/scala-js-chrome/issues/events{/number}","events_url":"https://api.github.com/repos/lucidd/scala-js-chrome/events","assignees_url":"https://api.github.com/repos/lucidd/scala-js-chrome/assignees{/user}","branches_url":"https://api.github.com/repos/lucidd/scala-js-chrome/branches{/branch}","tags_url":"https://api.github.com/repos/lucidd/scala-js-chrome/tags","blobs_url":"https://api.github.com/repos/lucidd/scala-js-chrome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucidd/scala-js-chrome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucidd/scala-js-chrome/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucidd/scala-js-chrome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucidd/scala-js-chrome/statuses/{sha}","languages_url":"https://api.github.com/repos/lucidd/scala-js-chrome/languages","stargazers_url":"https://api.github.com/repos/lucidd/scala-js-chrome/stargazers","contributors_url":"https://api.github.com/repos/lucidd/scala-js-chrome/contributors","subscribers_url":"https://api.github.com/repos/lucidd/scala-js-chrome/subscribers","subscription_url":"https://api.github.com/repos/lucidd/scala-js-chrome/subscription","commits_url":"https://api.github.com/repos/lucidd/scala-js-chrome/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucidd/scala-js-chrome/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucidd/scala-js-chrome/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucidd/scala-js-chrome/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucidd/scala-js-chrome/contents/{+path}","compare_url":"https://api.github.com/repos/lucidd/scala-js-chrome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucidd/scala-js-chrome/merges","archive_url":"https://api.github.com/repos/lucidd/scala-js-chrome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucidd/scala-js-chrome/downloads","issues_url":"https://api.github.com/repos/lucidd/scala-js-chrome/issues{/number}","pulls_url":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls{/number}","milestones_url":"https://api.github.com/repos/lucidd/scala-js-chrome/milestones{/number}","notifications_url":"https://api.github.com/repos/lucidd/scala-js-chrome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucidd/scala-js-chrome/labels{/name}","releases_url":"https://api.github.com/repos/lucidd/scala-js-chrome/releases{/id}","deployments_url":"https://api.github.com/repos/lucidd/scala-js-chrome/deployments","created_at":"2015-01-09T01:06:06Z","updated_at":"2016-05-24T12:37:07Z","pushed_at":"2016-06-12T21:32:48Z","git_url":"git://github.com/lucidd/scala-js-chrome.git","ssh_url":"git@github.com:lucidd/scala-js-chrome.git","clone_url":"https://github.com/lucidd/scala-js-chrome.git","svn_url":"https://github.com/lucidd/scala-js-chrome","homepage":null,"size":166,"stargazers_count":18,"watchers_count":18,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":8,"forks":9,"open_issues":8,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/9"},"html":{"href":"https://github.com/lucidd/scala-js-chrome/pull/9"},"issue":{"href":"https://api.github.com/repos/lucidd/scala-js-chrome/issues/9"},"comments":{"href":"https://api.github.com/repos/lucidd/scala-js-chrome/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lucidd/scala-js-chrome/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/lucidd/scala-js-chrome/statuses/bc3a8e0f0051e05eac858e5cf30a0282a0387cb0"}}}}
{"actor":{"display_login":"lucidd"}}