{"action":"created","comment":{"url":"https://api.github.com/repos/marco-c/mercurius/pulls/comments/48785152","id":48785152,"diff_hunk":"@@ -183,20 +183,26 @@ function makeId(length) {\n // create DOM Element for a device\n function showMachine(token, mId, device, clients) {\n   var tr = document.createElement('tr');\n+  if (mId === machineId) {\n+    tr.classList.add('currentMachine');\n+  }\n   var td = document.createElement('td');\n   var a = document.createElement('a');\n   td.classList.add('machine');\n-  a.textContent = '[x]';\n-  a.onclick = function() {\n-    unregisterMachine(mId)\n-    .then(function(response) {\n-      response.json()\n-      .then(function(body) {\n-        showMachines(token, body.machines, body.clients);\n+  // unregister current machine only by using a button","path":"static/index.js","position":17,"original_position":17,"commit_id":"4e5fb9b9db2933ffa51100520ae76bf777507da0","original_commit_id":"4e5fb9b9db2933ffa51100520ae76bf777507da0","user":{"login":"zalun","id":97885,"avatar_url":"https://avatars.githubusercontent.com/u/97885?v=3","gravatar_id":"","url":"https://api.github.com/users/zalun","html_url":"https://github.com/zalun","followers_url":"https://api.github.com/users/zalun/followers","following_url":"https://api.github.com/users/zalun/following{/other_user}","gists_url":"https://api.github.com/users/zalun/gists{/gist_id}","starred_url":"https://api.github.com/users/zalun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalun/subscriptions","organizations_url":"https://api.github.com/users/zalun/orgs","repos_url":"https://api.github.com/users/zalun/repos","events_url":"https://api.github.com/users/zalun/events{/privacy}","received_events_url":"https://api.github.com/users/zalun/received_events","type":"User","site_admin":false},"body":"then we would need to have a different action for current one - forceUnregister one instead of reloading the page... which is certainly possible.","created_at":"2016-01-04T21:42:37Z","updated_at":"2016-01-04T21:42:37Z","html_url":"https://github.com/marco-c/mercurius/pull/82#discussion_r48785152","pull_request_url":"https://api.github.com/repos/marco-c/mercurius/pulls/82","_links":{"self":{"href":"https://api.github.com/repos/marco-c/mercurius/pulls/comments/48785152"},"html":{"href":"https://github.com/marco-c/mercurius/pull/82#discussion_r48785152"},"pull_request":{"href":"https://api.github.com/repos/marco-c/mercurius/pulls/82"}}},"pull_request":{"url":"https://api.github.com/repos/marco-c/mercurius/pulls/82","id":54975069,"html_url":"https://github.com/marco-c/mercurius/pull/82","diff_url":"https://github.com/marco-c/mercurius/pull/82.diff","patch_url":"https://github.com/marco-c/mercurius/pull/82.patch","issue_url":"https://api.github.com/repos/marco-c/mercurius/issues/82","number":82,"state":"open","locked":false,"title":"deleting token after unregistering its last machine","user":{"login":"zalun","id":97885,"avatar_url":"https://avatars.githubusercontent.com/u/97885?v=3","gravatar_id":"","url":"https://api.github.com/users/zalun","html_url":"https://github.com/zalun","followers_url":"https://api.github.com/users/zalun/followers","following_url":"https://api.github.com/users/zalun/following{/other_user}","gists_url":"https://api.github.com/users/zalun/gists{/gist_id}","starred_url":"https://api.github.com/users/zalun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalun/subscriptions","organizations_url":"https://api.github.com/users/zalun/orgs","repos_url":"https://api.github.com/users/zalun/repos","events_url":"https://api.github.com/users/zalun/events{/privacy}","received_events_url":"https://api.github.com/users/zalun/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-04T13:33:35Z","updated_at":"2016-01-04T21:42:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3692bfbc9445c96fe5d56308583c6f315bbfcebf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/marco-c/mercurius/pulls/82/commits","review_comments_url":"https://api.github.com/repos/marco-c/mercurius/pulls/82/comments","review_comment_url":"https://api.github.com/repos/marco-c/mercurius/pulls/comments{/number}","comments_url":"https://api.github.com/repos/marco-c/mercurius/issues/82/comments","statuses_url":"https://api.github.com/repos/marco-c/mercurius/statuses/4e5fb9b9db2933ffa51100520ae76bf777507da0","head":{"label":"zalun:delete_token_if_no_machines","ref":"delete_token_if_no_machines","sha":"4e5fb9b9db2933ffa51100520ae76bf777507da0","user":{"login":"zalun","id":97885,"avatar_url":"https://avatars.githubusercontent.com/u/97885?v=3","gravatar_id":"","url":"https://api.github.com/users/zalun","html_url":"https://github.com/zalun","followers_url":"https://api.github.com/users/zalun/followers","following_url":"https://api.github.com/users/zalun/following{/other_user}","gists_url":"https://api.github.com/users/zalun/gists{/gist_id}","starred_url":"https://api.github.com/users/zalun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalun/subscriptions","organizations_url":"https://api.github.com/users/zalun/orgs","repos_url":"https://api.github.com/users/zalun/repos","events_url":"https://api.github.com/users/zalun/events{/privacy}","received_events_url":"https://api.github.com/users/zalun/received_events","type":"User","site_admin":false},"repo":{"id":46348771,"name":"mercurius","full_name":"zalun/mercurius","owner":{"login":"zalun","id":97885,"avatar_url":"https://avatars.githubusercontent.com/u/97885?v=3","gravatar_id":"","url":"https://api.github.com/users/zalun","html_url":"https://github.com/zalun","followers_url":"https://api.github.com/users/zalun/followers","following_url":"https://api.github.com/users/zalun/following{/other_user}","gists_url":"https://api.github.com/users/zalun/gists{/gist_id}","starred_url":"https://api.github.com/users/zalun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalun/subscriptions","organizations_url":"https://api.github.com/users/zalun/orgs","repos_url":"https://api.github.com/users/zalun/repos","events_url":"https://api.github.com/users/zalun/events{/privacy}","received_events_url":"https://api.github.com/users/zalun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zalun/mercurius","description":"Generic push server","fork":true,"url":"https://api.github.com/repos/zalun/mercurius","forks_url":"https://api.github.com/repos/zalun/mercurius/forks","keys_url":"https://api.github.com/repos/zalun/mercurius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalun/mercurius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalun/mercurius/teams","hooks_url":"https://api.github.com/repos/zalun/mercurius/hooks","issue_events_url":"https://api.github.com/repos/zalun/mercurius/issues/events{/number}","events_url":"https://api.github.com/repos/zalun/mercurius/events","assignees_url":"https://api.github.com/repos/zalun/mercurius/assignees{/user}","branches_url":"https://api.github.com/repos/zalun/mercurius/branches{/branch}","tags_url":"https://api.github.com/repos/zalun/mercurius/tags","blobs_url":"https://api.github.com/repos/zalun/mercurius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalun/mercurius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalun/mercurius/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalun/mercurius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalun/mercurius/statuses/{sha}","languages_url":"https://api.github.com/repos/zalun/mercurius/languages","stargazers_url":"https://api.github.com/repos/zalun/mercurius/stargazers","contributors_url":"https://api.github.com/repos/zalun/mercurius/contributors","subscribers_url":"https://api.github.com/repos/zalun/mercurius/subscribers","subscription_url":"https://api.github.com/repos/zalun/mercurius/subscription","commits_url":"https://api.github.com/repos/zalun/mercurius/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalun/mercurius/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalun/mercurius/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalun/mercurius/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalun/mercurius/contents/{+path}","compare_url":"https://api.github.com/repos/zalun/mercurius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalun/mercurius/merges","archive_url":"https://api.github.com/repos/zalun/mercurius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalun/mercurius/downloads","issues_url":"https://api.github.com/repos/zalun/mercurius/issues{/number}","pulls_url":"https://api.github.com/repos/zalun/mercurius/pulls{/number}","milestones_url":"https://api.github.com/repos/zalun/mercurius/milestones{/number}","notifications_url":"https://api.github.com/repos/zalun/mercurius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalun/mercurius/labels{/name}","releases_url":"https://api.github.com/repos/zalun/mercurius/releases{/id}","created_at":"2015-11-17T13:28:57Z","updated_at":"2015-11-25T13:47:20Z","pushed_at":"2016-01-04T13:33:20Z","git_url":"git://github.com/zalun/mercurius.git","ssh_url":"git@github.com:zalun/mercurius.git","clone_url":"https://github.com/zalun/mercurius.git","svn_url":"https://github.com/zalun/mercurius","homepage":null,"size":180,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"marco-c:master","ref":"master","sha":"398dc84f020467922732632023b65caa56245a8f","user":{"login":"marco-c","id":1616846,"avatar_url":"https://avatars.githubusercontent.com/u/1616846?v=3","gravatar_id":"","url":"https://api.github.com/users/marco-c","html_url":"https://github.com/marco-c","followers_url":"https://api.github.com/users/marco-c/followers","following_url":"https://api.github.com/users/marco-c/following{/other_user}","gists_url":"https://api.github.com/users/marco-c/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-c/subscriptions","organizations_url":"https://api.github.com/users/marco-c/orgs","repos_url":"https://api.github.com/users/marco-c/repos","events_url":"https://api.github.com/users/marco-c/events{/privacy}","received_events_url":"https://api.github.com/users/marco-c/received_events","type":"User","site_admin":false},"repo":{"id":46348691,"name":"mercurius","full_name":"marco-c/mercurius","owner":{"login":"marco-c","id":1616846,"avatar_url":"https://avatars.githubusercontent.com/u/1616846?v=3","gravatar_id":"","url":"https://api.github.com/users/marco-c","html_url":"https://github.com/marco-c","followers_url":"https://api.github.com/users/marco-c/followers","following_url":"https://api.github.com/users/marco-c/following{/other_user}","gists_url":"https://api.github.com/users/marco-c/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-c/subscriptions","organizations_url":"https://api.github.com/users/marco-c/orgs","repos_url":"https://api.github.com/users/marco-c/repos","events_url":"https://api.github.com/users/marco-c/events{/privacy}","received_events_url":"https://api.github.com/users/marco-c/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marco-c/mercurius","description":"Generic Web Push server","fork":false,"url":"https://api.github.com/repos/marco-c/mercurius","forks_url":"https://api.github.com/repos/marco-c/mercurius/forks","keys_url":"https://api.github.com/repos/marco-c/mercurius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marco-c/mercurius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marco-c/mercurius/teams","hooks_url":"https://api.github.com/repos/marco-c/mercurius/hooks","issue_events_url":"https://api.github.com/repos/marco-c/mercurius/issues/events{/number}","events_url":"https://api.github.com/repos/marco-c/mercurius/events","assignees_url":"https://api.github.com/repos/marco-c/mercurius/assignees{/user}","branches_url":"https://api.github.com/repos/marco-c/mercurius/branches{/branch}","tags_url":"https://api.github.com/repos/marco-c/mercurius/tags","blobs_url":"https://api.github.com/repos/marco-c/mercurius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marco-c/mercurius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marco-c/mercurius/git/refs{/sha}","trees_url":"https://api.github.com/repos/marco-c/mercurius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marco-c/mercurius/statuses/{sha}","languages_url":"https://api.github.com/repos/marco-c/mercurius/languages","stargazers_url":"https://api.github.com/repos/marco-c/mercurius/stargazers","contributors_url":"https://api.github.com/repos/marco-c/mercurius/contributors","subscribers_url":"https://api.github.com/repos/marco-c/mercurius/subscribers","subscription_url":"https://api.github.com/repos/marco-c/mercurius/subscription","commits_url":"https://api.github.com/repos/marco-c/mercurius/commits{/sha}","git_commits_url":"https://api.github.com/repos/marco-c/mercurius/git/commits{/sha}","comments_url":"https://api.github.com/repos/marco-c/mercurius/comments{/number}","issue_comment_url":"https://api.github.com/repos/marco-c/mercurius/issues/comments{/number}","contents_url":"https://api.github.com/repos/marco-c/mercurius/contents/{+path}","compare_url":"https://api.github.com/repos/marco-c/mercurius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marco-c/mercurius/merges","archive_url":"https://api.github.com/repos/marco-c/mercurius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marco-c/mercurius/downloads","issues_url":"https://api.github.com/repos/marco-c/mercurius/issues{/number}","pulls_url":"https://api.github.com/repos/marco-c/mercurius/pulls{/number}","milestones_url":"https://api.github.com/repos/marco-c/mercurius/milestones{/number}","notifications_url":"https://api.github.com/repos/marco-c/mercurius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marco-c/mercurius/labels{/name}","releases_url":"https://api.github.com/repos/marco-c/mercurius/releases{/id}","created_at":"2015-11-17T13:27:20Z","updated_at":"2015-12-22T22:13:10Z","pushed_at":"2016-01-04T13:33:35Z","git_url":"git://github.com/marco-c/mercurius.git","ssh_url":"git@github.com:marco-c/mercurius.git","clone_url":"https://github.com/marco-c/mercurius.git","svn_url":"https://github.com/marco-c/mercurius","homepage":"https://mozcurius.herokuapp.com/","size":185,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":10,"forks":3,"open_issues":10,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/marco-c/mercurius/pulls/82"},"html":{"href":"https://github.com/marco-c/mercurius/pull/82"},"issue":{"href":"https://api.github.com/repos/marco-c/mercurius/issues/82"},"comments":{"href":"https://api.github.com/repos/marco-c/mercurius/issues/82/comments"},"review_comments":{"href":"https://api.github.com/repos/marco-c/mercurius/pulls/82/comments"},"review_comment":{"href":"https://api.github.com/repos/marco-c/mercurius/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/marco-c/mercurius/pulls/82/commits"},"statuses":{"href":"https://api.github.com/repos/marco-c/mercurius/statuses/4e5fb9b9db2933ffa51100520ae76bf777507da0"}}}}