{"action":"created","comment":{"url":"https://api.github.com/repos/ssi-anik/linqueue/pulls/comments/78297183","id":78297183,"diff_hunk":"@@ -1,29 +1,19 @@\n // callback to be called on click performed.\n function saveLink(info, tab){\n-\t// broadcast a message to the current tab\n-\tchrome.tabs.query({active: true}, function(tabs) {\n-\t\t// set message object to pass\n-\t    var message = { \"message\": \"linqueue_get_anchor_title\" };\n-\t    var key = getCurrentTime();\n-\t    var value = {};\n-\t    // send broadcast\n-\t    chrome.tabs.sendMessage(tabs[0].id, message, function(response){\n-\t    \t// get the title from the response\n-\t    \tvar title = response && response.title;\n-\t    \t// check if the title is present\n-\t    \tif(!title){\n-\t    \t\ttitle = tabs[0].title;;\n-\t    \t}\n-\t    \t// get the url\n-\t    \tvar url = info.linkUrl;\n-\t    \t// set the title to value\n-\t    \tvalue.title = title;\n-\t    \t// set the url to value\n-\t    \tvalue.url = url;\n-\t    \t// save the url and title\n-\t    \tsaveData(key, value)\n-\t    });\n-\t});\n+\tvar message = { \"message\": \"linqueue_get_anchor_title\" };\n+\tvar key = getCurrentTime();\n+\tvar value = {};\n+\n+\tchrome.tabs.sendMessage(tab.id, message, function(response) {\n+\t\t//Title text got from content script\n+\t\tvar title = (response && response.value)? response.value : \"Title not found\";","path":"js/background.js","position":33,"original_position":33,"commit_id":"6f0d3f9466097a65c4f982f652f6a2ebb75da022","original_commit_id":"6f0d3f9466097a65c4f982f652f6a2ebb75da022","user":{"login":"ssi-anik","id":2676602,"avatar_url":"https://avatars.githubusercontent.com/u/2676602?v=3","gravatar_id":"","url":"https://api.github.com/users/ssi-anik","html_url":"https://github.com/ssi-anik","followers_url":"https://api.github.com/users/ssi-anik/followers","following_url":"https://api.github.com/users/ssi-anik/following{/other_user}","gists_url":"https://api.github.com/users/ssi-anik/gists{/gist_id}","starred_url":"https://api.github.com/users/ssi-anik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssi-anik/subscriptions","organizations_url":"https://api.github.com/users/ssi-anik/orgs","repos_url":"https://api.github.com/users/ssi-anik/repos","events_url":"https://api.github.com/users/ssi-anik/events{/privacy}","received_events_url":"https://api.github.com/users/ssi-anik/received_events","type":"User","site_admin":false},"body":"I think it's good if you stick to the property of an object, like response should have a reasonable property like \"response.title\" \r\nThe property value can be anything. Please change here.","created_at":"2016-09-11T15:30:01Z","updated_at":"2016-09-11T15:30:01Z","html_url":"https://github.com/ssi-anik/linqueue/pull/1#discussion_r78297183","pull_request_url":"https://api.github.com/repos/ssi-anik/linqueue/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ssi-anik/linqueue/pulls/comments/78297183"},"html":{"href":"https://github.com/ssi-anik/linqueue/pull/1#discussion_r78297183"},"pull_request":{"href":"https://api.github.com/repos/ssi-anik/linqueue/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ssi-anik/linqueue/pulls/1","id":84758690,"html_url":"https://github.com/ssi-anik/linqueue/pull/1","diff_url":"https://github.com/ssi-anik/linqueue/pull/1.diff","patch_url":"https://github.com/ssi-anik/linqueue/pull/1.patch","issue_url":"https://api.github.com/repos/ssi-anik/linqueue/issues/1","number":1,"state":"open","locked":false,"title":"Unnecessary jQuery file removed and Finding clicked link text code up…","user":{"login":"me-shaon","id":831997,"avatar_url":"https://avatars.githubusercontent.com/u/831997?v=3","gravatar_id":"","url":"https://api.github.com/users/me-shaon","html_url":"https://github.com/me-shaon","followers_url":"https://api.github.com/users/me-shaon/followers","following_url":"https://api.github.com/users/me-shaon/following{/other_user}","gists_url":"https://api.github.com/users/me-shaon/gists{/gist_id}","starred_url":"https://api.github.com/users/me-shaon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/me-shaon/subscriptions","organizations_url":"https://api.github.com/users/me-shaon/orgs","repos_url":"https://api.github.com/users/me-shaon/repos","events_url":"https://api.github.com/users/me-shaon/events{/privacy}","received_events_url":"https://api.github.com/users/me-shaon/received_events","type":"User","site_admin":false},"body":"I found that the jquery script is not needed, as it is only used in a 3 line code. Replaced that with vanilla javascript. Also re-factored the code of getting link Text.","created_at":"2016-09-10T15:28:59Z","updated_at":"2016-09-11T15:30:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d570f5ab03c3dfc32e5fb01bc1d033ca945bcc46","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ssi-anik/linqueue/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ssi-anik/linqueue/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ssi-anik/linqueue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ssi-anik/linqueue/issues/1/comments","statuses_url":"https://api.github.com/repos/ssi-anik/linqueue/statuses/6f0d3f9466097a65c4f982f652f6a2ebb75da022","head":{"label":"me-shaon:master","ref":"master","sha":"6f0d3f9466097a65c4f982f652f6a2ebb75da022","user":{"login":"me-shaon","id":831997,"avatar_url":"https://avatars.githubusercontent.com/u/831997?v=3","gravatar_id":"","url":"https://api.github.com/users/me-shaon","html_url":"https://github.com/me-shaon","followers_url":"https://api.github.com/users/me-shaon/followers","following_url":"https://api.github.com/users/me-shaon/following{/other_user}","gists_url":"https://api.github.com/users/me-shaon/gists{/gist_id}","starred_url":"https://api.github.com/users/me-shaon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/me-shaon/subscriptions","organizations_url":"https://api.github.com/users/me-shaon/orgs","repos_url":"https://api.github.com/users/me-shaon/repos","events_url":"https://api.github.com/users/me-shaon/events{/privacy}","received_events_url":"https://api.github.com/users/me-shaon/received_events","type":"User","site_admin":false},"repo":{"id":67873284,"name":"linqueue","full_name":"me-shaon/linqueue","owner":{"login":"me-shaon","id":831997,"avatar_url":"https://avatars.githubusercontent.com/u/831997?v=3","gravatar_id":"","url":"https://api.github.com/users/me-shaon","html_url":"https://github.com/me-shaon","followers_url":"https://api.github.com/users/me-shaon/followers","following_url":"https://api.github.com/users/me-shaon/following{/other_user}","gists_url":"https://api.github.com/users/me-shaon/gists{/gist_id}","starred_url":"https://api.github.com/users/me-shaon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/me-shaon/subscriptions","organizations_url":"https://api.github.com/users/me-shaon/orgs","repos_url":"https://api.github.com/users/me-shaon/repos","events_url":"https://api.github.com/users/me-shaon/events{/privacy}","received_events_url":"https://api.github.com/users/me-shaon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/me-shaon/linqueue","description":"A chrome extension for queuing links.","fork":true,"url":"https://api.github.com/repos/me-shaon/linqueue","forks_url":"https://api.github.com/repos/me-shaon/linqueue/forks","keys_url":"https://api.github.com/repos/me-shaon/linqueue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/me-shaon/linqueue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/me-shaon/linqueue/teams","hooks_url":"https://api.github.com/repos/me-shaon/linqueue/hooks","issue_events_url":"https://api.github.com/repos/me-shaon/linqueue/issues/events{/number}","events_url":"https://api.github.com/repos/me-shaon/linqueue/events","assignees_url":"https://api.github.com/repos/me-shaon/linqueue/assignees{/user}","branches_url":"https://api.github.com/repos/me-shaon/linqueue/branches{/branch}","tags_url":"https://api.github.com/repos/me-shaon/linqueue/tags","blobs_url":"https://api.github.com/repos/me-shaon/linqueue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/me-shaon/linqueue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/me-shaon/linqueue/git/refs{/sha}","trees_url":"https://api.github.com/repos/me-shaon/linqueue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/me-shaon/linqueue/statuses/{sha}","languages_url":"https://api.github.com/repos/me-shaon/linqueue/languages","stargazers_url":"https://api.github.com/repos/me-shaon/linqueue/stargazers","contributors_url":"https://api.github.com/repos/me-shaon/linqueue/contributors","subscribers_url":"https://api.github.com/repos/me-shaon/linqueue/subscribers","subscription_url":"https://api.github.com/repos/me-shaon/linqueue/subscription","commits_url":"https://api.github.com/repos/me-shaon/linqueue/commits{/sha}","git_commits_url":"https://api.github.com/repos/me-shaon/linqueue/git/commits{/sha}","comments_url":"https://api.github.com/repos/me-shaon/linqueue/comments{/number}","issue_comment_url":"https://api.github.com/repos/me-shaon/linqueue/issues/comments{/number}","contents_url":"https://api.github.com/repos/me-shaon/linqueue/contents/{+path}","compare_url":"https://api.github.com/repos/me-shaon/linqueue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/me-shaon/linqueue/merges","archive_url":"https://api.github.com/repos/me-shaon/linqueue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/me-shaon/linqueue/downloads","issues_url":"https://api.github.com/repos/me-shaon/linqueue/issues{/number}","pulls_url":"https://api.github.com/repos/me-shaon/linqueue/pulls{/number}","milestones_url":"https://api.github.com/repos/me-shaon/linqueue/milestones{/number}","notifications_url":"https://api.github.com/repos/me-shaon/linqueue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/me-shaon/linqueue/labels{/name}","releases_url":"https://api.github.com/repos/me-shaon/linqueue/releases{/id}","deployments_url":"https://api.github.com/repos/me-shaon/linqueue/deployments","created_at":"2016-09-10T13:43:18Z","updated_at":"2016-09-10T13:43:22Z","pushed_at":"2016-09-10T15:25:23Z","git_url":"git://github.com/me-shaon/linqueue.git","ssh_url":"git@github.com:me-shaon/linqueue.git","clone_url":"https://github.com/me-shaon/linqueue.git","svn_url":"https://github.com/me-shaon/linqueue","homepage":null,"size":674,"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":"ssi-anik:master","ref":"master","sha":"6caf1aff961228f83075d36b7b038295125ae104","user":{"login":"ssi-anik","id":2676602,"avatar_url":"https://avatars.githubusercontent.com/u/2676602?v=3","gravatar_id":"","url":"https://api.github.com/users/ssi-anik","html_url":"https://github.com/ssi-anik","followers_url":"https://api.github.com/users/ssi-anik/followers","following_url":"https://api.github.com/users/ssi-anik/following{/other_user}","gists_url":"https://api.github.com/users/ssi-anik/gists{/gist_id}","starred_url":"https://api.github.com/users/ssi-anik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssi-anik/subscriptions","organizations_url":"https://api.github.com/users/ssi-anik/orgs","repos_url":"https://api.github.com/users/ssi-anik/repos","events_url":"https://api.github.com/users/ssi-anik/events{/privacy}","received_events_url":"https://api.github.com/users/ssi-anik/received_events","type":"User","site_admin":false},"repo":{"id":67814716,"name":"linqueue","full_name":"ssi-anik/linqueue","owner":{"login":"ssi-anik","id":2676602,"avatar_url":"https://avatars.githubusercontent.com/u/2676602?v=3","gravatar_id":"","url":"https://api.github.com/users/ssi-anik","html_url":"https://github.com/ssi-anik","followers_url":"https://api.github.com/users/ssi-anik/followers","following_url":"https://api.github.com/users/ssi-anik/following{/other_user}","gists_url":"https://api.github.com/users/ssi-anik/gists{/gist_id}","starred_url":"https://api.github.com/users/ssi-anik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssi-anik/subscriptions","organizations_url":"https://api.github.com/users/ssi-anik/orgs","repos_url":"https://api.github.com/users/ssi-anik/repos","events_url":"https://api.github.com/users/ssi-anik/events{/privacy}","received_events_url":"https://api.github.com/users/ssi-anik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ssi-anik/linqueue","description":"A chrome extension for queuing links.","fork":false,"url":"https://api.github.com/repos/ssi-anik/linqueue","forks_url":"https://api.github.com/repos/ssi-anik/linqueue/forks","keys_url":"https://api.github.com/repos/ssi-anik/linqueue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ssi-anik/linqueue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ssi-anik/linqueue/teams","hooks_url":"https://api.github.com/repos/ssi-anik/linqueue/hooks","issue_events_url":"https://api.github.com/repos/ssi-anik/linqueue/issues/events{/number}","events_url":"https://api.github.com/repos/ssi-anik/linqueue/events","assignees_url":"https://api.github.com/repos/ssi-anik/linqueue/assignees{/user}","branches_url":"https://api.github.com/repos/ssi-anik/linqueue/branches{/branch}","tags_url":"https://api.github.com/repos/ssi-anik/linqueue/tags","blobs_url":"https://api.github.com/repos/ssi-anik/linqueue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ssi-anik/linqueue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ssi-anik/linqueue/git/refs{/sha}","trees_url":"https://api.github.com/repos/ssi-anik/linqueue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ssi-anik/linqueue/statuses/{sha}","languages_url":"https://api.github.com/repos/ssi-anik/linqueue/languages","stargazers_url":"https://api.github.com/repos/ssi-anik/linqueue/stargazers","contributors_url":"https://api.github.com/repos/ssi-anik/linqueue/contributors","subscribers_url":"https://api.github.com/repos/ssi-anik/linqueue/subscribers","subscription_url":"https://api.github.com/repos/ssi-anik/linqueue/subscription","commits_url":"https://api.github.com/repos/ssi-anik/linqueue/commits{/sha}","git_commits_url":"https://api.github.com/repos/ssi-anik/linqueue/git/commits{/sha}","comments_url":"https://api.github.com/repos/ssi-anik/linqueue/comments{/number}","issue_comment_url":"https://api.github.com/repos/ssi-anik/linqueue/issues/comments{/number}","contents_url":"https://api.github.com/repos/ssi-anik/linqueue/contents/{+path}","compare_url":"https://api.github.com/repos/ssi-anik/linqueue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ssi-anik/linqueue/merges","archive_url":"https://api.github.com/repos/ssi-anik/linqueue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ssi-anik/linqueue/downloads","issues_url":"https://api.github.com/repos/ssi-anik/linqueue/issues{/number}","pulls_url":"https://api.github.com/repos/ssi-anik/linqueue/pulls{/number}","milestones_url":"https://api.github.com/repos/ssi-anik/linqueue/milestones{/number}","notifications_url":"https://api.github.com/repos/ssi-anik/linqueue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ssi-anik/linqueue/labels{/name}","releases_url":"https://api.github.com/repos/ssi-anik/linqueue/releases{/id}","deployments_url":"https://api.github.com/repos/ssi-anik/linqueue/deployments","created_at":"2016-09-09T16:29:22Z","updated_at":"2016-09-09T18:26:25Z","pushed_at":"2016-09-10T15:28:59Z","git_url":"git://github.com/ssi-anik/linqueue.git","ssh_url":"git@github.com:ssi-anik/linqueue.git","clone_url":"https://github.com/ssi-anik/linqueue.git","svn_url":"https://github.com/ssi-anik/linqueue","homepage":null,"size":673,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ssi-anik/linqueue/pulls/1"},"html":{"href":"https://github.com/ssi-anik/linqueue/pull/1"},"issue":{"href":"https://api.github.com/repos/ssi-anik/linqueue/issues/1"},"comments":{"href":"https://api.github.com/repos/ssi-anik/linqueue/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ssi-anik/linqueue/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ssi-anik/linqueue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ssi-anik/linqueue/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ssi-anik/linqueue/statuses/6f0d3f9466097a65c4f982f652f6a2ebb75da022"}}}}
{"actor":{"display_login":"ssi-anik"}}