{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/48597993","id":48597993,"diff_hunk":"@@ -0,0 +1,90 @@\n+/* global InputMethods, PromiseStorage*/\n+\n+\n+'use strict';\n+\n+(function() {\n+  function RecentKeys() {\n+    this._items = [];\n+  }\n+\n+  RecentKeys.prototype.RECENT_KEY_COUNT = 18;\n+\n+  RecentKeys.prototype.getItems = function() {\n+    return this._items || [];\n+  };\n+\n+  RecentKeys.prototype.setItems = function(val) {\n+    if (Array.isArray(val) && val.length) {\n+      this._items = val.slice(0, this.RECENT_KEY_COUNT);\n+    }\n+  };\n+\n+  RecentKeys.prototype.getPanelKeys = function() {\n+    return this._items.map(function(val) {","path":"apps/keyboard/js/imes/emoji/emoji.js","position":24,"original_position":24,"commit_id":"3ae09965f58317f5d5fd38248f21eaf57eeebeee","original_commit_id":"3ae09965f58317f5d5fd38248f21eaf57eeebeee","user":{"login":"timdream","id":93093,"avatar_url":"https://avatars.githubusercontent.com/u/93093?v=3","gravatar_id":"","url":"https://api.github.com/users/timdream","html_url":"https://github.com/timdream","followers_url":"https://api.github.com/users/timdream/followers","following_url":"https://api.github.com/users/timdream/following{/other_user}","gists_url":"https://api.github.com/users/timdream/gists{/gist_id}","starred_url":"https://api.github.com/users/timdream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdream/subscriptions","organizations_url":"https://api.github.com/users/timdream/orgs","repos_url":"https://api.github.com/users/timdream/repos","events_url":"https://api.github.com/users/timdream/events{/privacy}","received_events_url":"https://api.github.com/users/timdream/received_events","type":"User","site_admin":false},"body":"Protect this function with `if (!this._items) { throw ... }`","created_at":"2015-12-30T10:53:59Z","updated_at":"2015-12-30T10:53:59Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/33690#discussion_r48597993","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33690","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/48597993"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/33690#discussion_r48597993"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33690"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33690","id":54713428,"html_url":"https://github.com/mozilla-b2g/gaia/pull/33690","diff_url":"https://github.com/mozilla-b2g/gaia/pull/33690.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/33690.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33690","number":33690,"state":"open","locked":false,"title":"Bug 1100781 - Implement the recently used emojis feature, r=timdream","user":{"login":"raylin","id":1628746,"avatar_url":"https://avatars.githubusercontent.com/u/1628746?v=3","gravatar_id":"","url":"https://api.github.com/users/raylin","html_url":"https://github.com/raylin","followers_url":"https://api.github.com/users/raylin/followers","following_url":"https://api.github.com/users/raylin/following{/other_user}","gists_url":"https://api.github.com/users/raylin/gists{/gist_id}","starred_url":"https://api.github.com/users/raylin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raylin/subscriptions","organizations_url":"https://api.github.com/users/raylin/orgs","repos_url":"https://api.github.com/users/raylin/repos","events_url":"https://api.github.com/users/raylin/events{/privacy}","received_events_url":"https://api.github.com/users/raylin/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-29T09:39:26Z","updated_at":"2015-12-30T10:53:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb8f034fe0f74c765b64e8dd3f8195525cc1362e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33690/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33690/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33690/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/3ae09965f58317f5d5fd38248f21eaf57eeebeee","head":{"label":"raylin:1100781-recently-used-emojis","ref":"1100781-recently-used-emojis","sha":"3ae09965f58317f5d5fd38248f21eaf57eeebeee","user":{"login":"raylin","id":1628746,"avatar_url":"https://avatars.githubusercontent.com/u/1628746?v=3","gravatar_id":"","url":"https://api.github.com/users/raylin","html_url":"https://github.com/raylin","followers_url":"https://api.github.com/users/raylin/followers","following_url":"https://api.github.com/users/raylin/following{/other_user}","gists_url":"https://api.github.com/users/raylin/gists{/gist_id}","starred_url":"https://api.github.com/users/raylin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raylin/subscriptions","organizations_url":"https://api.github.com/users/raylin/orgs","repos_url":"https://api.github.com/users/raylin/repos","events_url":"https://api.github.com/users/raylin/events{/privacy}","received_events_url":"https://api.github.com/users/raylin/received_events","type":"User","site_admin":false},"repo":{"id":45235906,"name":"gaia","full_name":"raylin/gaia","owner":{"login":"raylin","id":1628746,"avatar_url":"https://avatars.githubusercontent.com/u/1628746?v=3","gravatar_id":"","url":"https://api.github.com/users/raylin","html_url":"https://github.com/raylin","followers_url":"https://api.github.com/users/raylin/followers","following_url":"https://api.github.com/users/raylin/following{/other_user}","gists_url":"https://api.github.com/users/raylin/gists{/gist_id}","starred_url":"https://api.github.com/users/raylin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raylin/subscriptions","organizations_url":"https://api.github.com/users/raylin/orgs","repos_url":"https://api.github.com/users/raylin/repos","events_url":"https://api.github.com/users/raylin/events{/privacy}","received_events_url":"https://api.github.com/users/raylin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/raylin/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":true,"url":"https://api.github.com/repos/raylin/gaia","forks_url":"https://api.github.com/repos/raylin/gaia/forks","keys_url":"https://api.github.com/repos/raylin/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raylin/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raylin/gaia/teams","hooks_url":"https://api.github.com/repos/raylin/gaia/hooks","issue_events_url":"https://api.github.com/repos/raylin/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/raylin/gaia/events","assignees_url":"https://api.github.com/repos/raylin/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/raylin/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/raylin/gaia/tags","blobs_url":"https://api.github.com/repos/raylin/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raylin/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raylin/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/raylin/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raylin/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/raylin/gaia/languages","stargazers_url":"https://api.github.com/repos/raylin/gaia/stargazers","contributors_url":"https://api.github.com/repos/raylin/gaia/contributors","subscribers_url":"https://api.github.com/repos/raylin/gaia/subscribers","subscription_url":"https://api.github.com/repos/raylin/gaia/subscription","commits_url":"https://api.github.com/repos/raylin/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/raylin/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/raylin/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/raylin/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/raylin/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/raylin/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raylin/gaia/merges","archive_url":"https://api.github.com/repos/raylin/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raylin/gaia/downloads","issues_url":"https://api.github.com/repos/raylin/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/raylin/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/raylin/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/raylin/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raylin/gaia/labels{/name}","releases_url":"https://api.github.com/repos/raylin/gaia/releases{/id}","created_at":"2015-10-30T07:34:00Z","updated_at":"2015-10-30T07:35:13Z","pushed_at":"2015-12-30T10:33:48Z","git_url":"git://github.com/raylin/gaia.git","ssh_url":"git@github.com:raylin/gaia.git","clone_url":"https://github.com/raylin/gaia.git","svn_url":"https://github.com/raylin/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1002470,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"5ae4ebcc7f5a106b0495926bb5ded956ea00f2db","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2015-12-29T19:54:27Z","pushed_at":"2015-12-30T10:44:48Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1196694,"stargazers_count":2026,"watchers_count":2026,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2581,"mirror_url":null,"open_issues_count":1291,"forks":2581,"open_issues":1291,"watchers":2026,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33690"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/33690"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33690"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33690/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33690/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33690/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/3ae09965f58317f5d5fd38248f21eaf57eeebeee"}}}}