GitHub PullRequestReviewCommentEvent at 2014-11-14 12:17:12
Repository: gaia
Actor: gmarty
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/20355383","id":20355383,"diff_hunk":"@@ -0,0 +1,76 @@\n+/* global System, BaseUI */\n+'use strict';\n+\n+(function(exports) {\n+  var BatteryIcon = function(manager) {\n+    this.manager = manager;\n+    this.battery = window.navigator.battery;\n+  };\n+  BatteryIcon.prototype = Object.create(BaseUI.prototype);\n+  BatteryIcon.prototype.constructor = BatteryIcon;\n+  BatteryIcon.prototype.EVENT_PREFIX = 'batteryicon';\n+  BatteryIcon.prototype.containerElement = document.getElementById('statusbar');\n+  BatteryIcon.prototype.view = function() {\n+    return '<div id=\"statusbar-battery\" class=\"sb-start-upper sb-icon-label\" ' +\n+            'role=\"listitem\"></div>';\n+  };\n+  BatteryIcon.prototype.instanceID = 'statusbar-battery';\n+  BatteryIcon.prototype._fetchElements = function() {\n+    this.element = document.getElementById(this.instanceID);\n+  };\n+  BatteryIcon.prototype.show = function() {\n+    var hidden = this.element.hidden;\n+    if (!hidden) {\n+      return;\n+    }\n+    this.element.hidden = false;\n+    this.publish('shown');\n+  };\n+  BatteryIcon.prototype.hide = function() {\n+    var hidden = this.element.hidden;\n+    if (hidden) {\n+      return;\n+    }\n+    this.element.hidden = true;\n+    this.publish('hidden');\n+  };\n+  BatteryIcon.prototype.start = function() {\n+    this.battery.addEventListener('statuschange', this);\n+    this.battery.addEventListener('chargingchange', this);\n+    this.battery.addEventListener('levelchange', this);\n+    this.update();\n+  };\n+  BatteryIcon.prototype.stop = function() {\n+    this.battery.removeEventListener('statuschange', this);\n+    this.battery.removeEventListener('chargingchange', this);\n+    this.battery.removeEventListener('levelchange', this);\n+  };\n+  BatteryIcon.prototype.handleEvent = function() {\n+    this.update();\n+  };\n+  BatteryIcon.prototype.isVisible = function() {\n+    return this.element && !this.element.hidden;\n+  };\n+  BatteryIcon.prototype.update = function() {\n+    var icon = this.element;\n+    var previousLevel = parseInt(icon.dataset.level, 10);\n+    var previousCharging = icon.dataset.charging === 'true';\n+\n+    icon.dataset.charging = battery.charging;\n+    var level = Math.floor(battery.level * 10) * 10;\n+\n+    if (previousLevel !== level || previousCharging !== battery.charging) {\n+      icon.dataset.level = level;\n+      navigator.mozL10n.setAttributes(\n+        icon,\n+        battery.charging ? 'statusbarBatteryCharging' : 'statusbarBattery',\n+        {level: level}\n+      );\n+      this.previousCharging = battery.charging;\n+\n+      this.cloneStatusbar();","path":"apps/system/js/battery_icon.js","position":71,"original_position":71,"commit_id":"ee3c9699c7ef4efd4ea8614d7246f446582bf5d9","original_commit_id":"ee3c9699c7ef4efd4ea8614d7246f446582bf5d9","user":{"login":"gmarty","id":333865,"avatar_url":"https://avatars.githubusercontent.com/u/333865?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarty","html_url":"https://github.com/gmarty","followers_url":"https://api.github.com/users/gmarty/followers","following_url":"https://api.github.com/users/gmarty/following{/other_user}","gists_url":"https://api.github.com/users/gmarty/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarty/subscriptions","organizations_url":"https://api.github.com/users/gmarty/orgs","repos_url":"https://api.github.com/users/gmarty/repos","events_url":"https://api.github.com/users/gmarty/events{/privacy}","received_events_url":"https://api.github.com/users/gmarty/received_events","type":"User","site_admin":false},"body":"this.manager.cloneStatusbar();","created_at":"2014-11-14T12:17:12Z","updated_at":"2014-11-14T12:17:12Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/26111#discussion_r20355383","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26111","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/20355383"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/26111#discussion_r20355383"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26111"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26111","id":24367795,"html_url":"https://github.com/mozilla-b2g/gaia/pull/26111","diff_url":"https://github.com/mozilla-b2g/gaia/pull/26111.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/26111.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/26111","number":26111,"state":"open","locked":false,"title":"wip","user":{"login":"alivedise","id":546519,"avatar_url":"https://avatars.githubusercontent.com/u/546519?v=3","gravatar_id":"","url":"https://api.github.com/users/alivedise","html_url":"https://github.com/alivedise","followers_url":"https://api.github.com/users/alivedise/followers","following_url":"https://api.github.com/users/alivedise/following{/other_user}","gists_url":"https://api.github.com/users/alivedise/gists{/gist_id}","starred_url":"https://api.github.com/users/alivedise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alivedise/subscriptions","organizations_url":"https://api.github.com/users/alivedise/orgs","repos_url":"https://api.github.com/users/alivedise/repos","events_url":"https://api.github.com/users/alivedise/events{/privacy}","received_events_url":"https://api.github.com/users/alivedise/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-11-13T13:27:41Z","updated_at":"2014-11-14T12:17:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d9b5d0372db318a6e1f6528c6ed74bc7e344faa8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26111/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26111/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/26111/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/ee3c9699c7ef4efd4ea8614d7246f446582bf5d9","head":{"label":"alivedise:bugzilla/1098168/statusbar-baseicon","ref":"bugzilla/1098168/statusbar-baseicon","sha":"ee3c9699c7ef4efd4ea8614d7246f446582bf5d9","user":{"login":"alivedise","id":546519,"avatar_url":"https://avatars.githubusercontent.com/u/546519?v=3","gravatar_id":"","url":"https://api.github.com/users/alivedise","html_url":"https://github.com/alivedise","followers_url":"https://api.github.com/users/alivedise/followers","following_url":"https://api.github.com/users/alivedise/following{/other_user}","gists_url":"https://api.github.com/users/alivedise/gists{/gist_id}","starred_url":"https://api.github.com/users/alivedise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alivedise/subscriptions","organizations_url":"https://api.github.com/users/alivedise/orgs","repos_url":"https://api.github.com/users/alivedise/repos","events_url":"https://api.github.com/users/alivedise/events{/privacy}","received_events_url":"https://api.github.com/users/alivedise/received_events","type":"User","site_admin":false},"repo":{"id":4659245,"name":"gaia","full_name":"alivedise/gaia","owner":{"login":"alivedise","id":546519,"avatar_url":"https://avatars.githubusercontent.com/u/546519?v=3","gravatar_id":"","url":"https://api.github.com/users/alivedise","html_url":"https://github.com/alivedise","followers_url":"https://api.github.com/users/alivedise/followers","following_url":"https://api.github.com/users/alivedise/following{/other_user}","gists_url":"https://api.github.com/users/alivedise/gists{/gist_id}","starred_url":"https://api.github.com/users/alivedise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alivedise/subscriptions","organizations_url":"https://api.github.com/users/alivedise/orgs","repos_url":"https://api.github.com/users/alivedise/repos","events_url":"https://api.github.com/users/alivedise/events{/privacy}","received_events_url":"https://api.github.com/users/alivedise/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alivedise/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project","fork":true,"url":"https://api.github.com/repos/alivedise/gaia","forks_url":"https://api.github.com/repos/alivedise/gaia/forks","keys_url":"https://api.github.com/repos/alivedise/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alivedise/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alivedise/gaia/teams","hooks_url":"https://api.github.com/repos/alivedise/gaia/hooks","issue_events_url":"https://api.github.com/repos/alivedise/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/alivedise/gaia/events","assignees_url":"https://api.github.com/repos/alivedise/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/alivedise/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/alivedise/gaia/tags","blobs_url":"https://api.github.com/repos/alivedise/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alivedise/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alivedise/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/alivedise/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alivedise/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/alivedise/gaia/languages","stargazers_url":"https://api.github.com/repos/alivedise/gaia/stargazers","contributors_url":"https://api.github.com/repos/alivedise/gaia/contributors","subscribers_url":"https://api.github.com/repos/alivedise/gaia/subscribers","subscription_url":"https://api.github.com/repos/alivedise/gaia/subscription","commits_url":"https://api.github.com/repos/alivedise/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/alivedise/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/alivedise/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/alivedise/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/alivedise/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/alivedise/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alivedise/gaia/merges","archive_url":"https://api.github.com/repos/alivedise/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alivedise/gaia/downloads","issues_url":"https://api.github.com/repos/alivedise/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/alivedise/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/alivedise/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/alivedise/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alivedise/gaia/labels{/name}","releases_url":"https://api.github.com/repos/alivedise/gaia/releases{/id}","created_at":"2012-06-14T04:21:54Z","updated_at":"2014-07-09T07:58:30Z","pushed_at":"2014-11-14T11:49:58Z","git_url":"git://github.com/alivedise/gaia.git","ssh_url":"git@github.com:alivedise/gaia.git","clone_url":"https://github.com/alivedise/gaia.git","svn_url":"https://github.com/alivedise/gaia","homepage":"https://wiki.mozilla.org/B2G","size":884620,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"9593da7955c13baa7224de9448c05df5e815d268","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":"2014-11-14T06:47:23Z","pushed_at":"2014-11-14T11:50:18Z","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":1550461,"stargazers_count":1792,"watchers_count":1792,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2044,"mirror_url":null,"open_issues_count":660,"forks":2044,"open_issues":660,"watchers":1792,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26111"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/26111"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/26111"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/26111/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26111/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/26111/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/ee3c9699c7ef4efd4ea8614d7246f446582bf5d9"}}}}