{"action":"created","comment":{"url":"https://api.github.com/repos/graffiome/graffiome/pulls/comments/26350446","id":26350446,"diff_hunk":"@@ -0,0 +1,75 @@\n+var canvas, ctx, flag = false,\n+    prevX = 0,\n+    currX = 0,\n+    prevY = 0,\n+    currY = 0,\n+    dot_flag = false;\n+\n+var x = \"black\",\n+    y = 2;\n+\n+var overlayPage = {\n+  zIndex: 100,\n+  position: 'absolute',\n+  top: 0,\n+  left: 0\n+};\n+\n+$(function(){\n+  \n+  $('<canvas id=\"can\"></canvas>')\n+    .css(overlayPage)\n+    .attr('width', document.body.scrollWidth) // sets to max width\n+    .attr('height', document.body.scrollHeight) // sets to max height\n+    .on('mousemove', function(e){findxy('move', e)})\n+    .on('mousedown', function(e){findxy('down', e)})\n+    .on('mouseup', function(e){findxy('up', e)})\n+    .on('mouseout', function(e){ findxy('out', e)})\n+    .appendTo('body')\n+\n+  canvas = document.getElementById('can');\n+  ctx = canvas.getContext(\"2d\");\n+  w = canvas.width;\n+  h = canvas.height;\n+})\n+\n+function draw() {\n+  ctx.beginPath();\n+  ctx.moveTo(prevX+pageXOffset, prevY+pageYOffset);\n+  ctx.lineTo(currX+pageXOffset, currY+pageYOffset);\n+  ctx.strokeStyle = x;\n+  ctx.lineWidth = y;\n+  ctx.stroke();\n+  ctx.closePath();\n+}\n+\n+function findxy(res, e) { \n+  if (res == 'down') {\n+    prevX = currX;\n+    prevY = currY;\n+    currX = e.clientX - canvas.offsetLeft;\n+    currY = e.clientY - canvas.offsetTop;\n+\n+    flag = true;\n+    dot_flag = true;\n+    if (dot_flag) {","path":"src/content-scripts/canvas.js","position":55,"original_position":55,"commit_id":"7ef2064d0ff867c653d30efabc33a9adb01be94b","original_commit_id":"72c5d588fdde4bf96bfc14dd935ec7590702e98d","user":{"login":"mrblueblue","id":9220038,"avatar_url":"https://avatars.githubusercontent.com/u/9220038?v=3","gravatar_id":"","url":"https://api.github.com/users/mrblueblue","html_url":"https://github.com/mrblueblue","followers_url":"https://api.github.com/users/mrblueblue/followers","following_url":"https://api.github.com/users/mrblueblue/following{/other_user}","gists_url":"https://api.github.com/users/mrblueblue/gists{/gist_id}","starred_url":"https://api.github.com/users/mrblueblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrblueblue/subscriptions","organizations_url":"https://api.github.com/users/mrblueblue/orgs","repos_url":"https://api.github.com/users/mrblueblue/repos","events_url":"https://api.github.com/users/mrblueblue/events{/privacy}","received_events_url":"https://api.github.com/users/mrblueblue/received_events","type":"User","site_admin":false},"body":"I've removed the dot_flag since its unnecessary. \r\n\r\nJust to notet the other flag is necessary to distinguish drawing mousemove events and normal mousemove events. ","created_at":"2015-03-12T22:24:09Z","updated_at":"2015-03-12T22:24:09Z","html_url":"https://github.com/graffiome/graffiome/pull/19#discussion_r26350446","pull_request_url":"https://api.github.com/repos/graffiome/graffiome/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/graffiome/graffiome/pulls/comments/26350446"},"html":{"href":"https://github.com/graffiome/graffiome/pull/19#discussion_r26350446"},"pull_request":{"href":"https://api.github.com/repos/graffiome/graffiome/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/graffiome/graffiome/pulls/19","id":31081490,"html_url":"https://github.com/graffiome/graffiome/pull/19","diff_url":"https://github.com/graffiome/graffiome/pull/19.diff","patch_url":"https://github.com/graffiome/graffiome/pull/19.patch","issue_url":"https://api.github.com/repos/graffiome/graffiome/issues/19","number":19,"state":"open","locked":false,"title":"Feat/Full page defacement","user":{"login":"mrblueblue","id":9220038,"avatar_url":"https://avatars.githubusercontent.com/u/9220038?v=3","gravatar_id":"","url":"https://api.github.com/users/mrblueblue","html_url":"https://github.com/mrblueblue","followers_url":"https://api.github.com/users/mrblueblue/followers","following_url":"https://api.github.com/users/mrblueblue/following{/other_user}","gists_url":"https://api.github.com/users/mrblueblue/gists{/gist_id}","starred_url":"https://api.github.com/users/mrblueblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrblueblue/subscriptions","organizations_url":"https://api.github.com/users/mrblueblue/orgs","repos_url":"https://api.github.com/users/mrblueblue/repos","events_url":"https://api.github.com/users/mrblueblue/events{/privacy}","received_events_url":"https://api.github.com/users/mrblueblue/received_events","type":"User","site_admin":false},"body":"Users can now deface the entire web page.\r\n\r\nExtension injects a full page canvas overlay, which allows users to draw on the page.\r\n\r\nThe canvas does not resize.\r\n\r\nCurrently, the extension does not work on cnn.com, but it does work for nytimes.com. ","created_at":"2015-03-12T21:51:35Z","updated_at":"2015-03-12T22:24:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c64d310b5ec56ef3b442ce3ea17f10b90e0b8ae9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/graffiome/graffiome/pulls/19/commits","review_comments_url":"https://api.github.com/repos/graffiome/graffiome/pulls/19/comments","review_comment_url":"https://api.github.com/repos/graffiome/graffiome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/graffiome/graffiome/issues/19/comments","statuses_url":"https://api.github.com/repos/graffiome/graffiome/statuses/7ef2064d0ff867c653d30efabc33a9adb01be94b","head":{"label":"mrblueblue:canvas-full-page-no-resize","ref":"canvas-full-page-no-resize","sha":"7ef2064d0ff867c653d30efabc33a9adb01be94b","user":{"login":"mrblueblue","id":9220038,"avatar_url":"https://avatars.githubusercontent.com/u/9220038?v=3","gravatar_id":"","url":"https://api.github.com/users/mrblueblue","html_url":"https://github.com/mrblueblue","followers_url":"https://api.github.com/users/mrblueblue/followers","following_url":"https://api.github.com/users/mrblueblue/following{/other_user}","gists_url":"https://api.github.com/users/mrblueblue/gists{/gist_id}","starred_url":"https://api.github.com/users/mrblueblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrblueblue/subscriptions","organizations_url":"https://api.github.com/users/mrblueblue/orgs","repos_url":"https://api.github.com/users/mrblueblue/repos","events_url":"https://api.github.com/users/mrblueblue/events{/privacy}","received_events_url":"https://api.github.com/users/mrblueblue/received_events","type":"User","site_admin":false},"repo":{"id":32043193,"name":"graffiome","full_name":"mrblueblue/graffiome","owner":{"login":"mrblueblue","id":9220038,"avatar_url":"https://avatars.githubusercontent.com/u/9220038?v=3","gravatar_id":"","url":"https://api.github.com/users/mrblueblue","html_url":"https://github.com/mrblueblue","followers_url":"https://api.github.com/users/mrblueblue/followers","following_url":"https://api.github.com/users/mrblueblue/following{/other_user}","gists_url":"https://api.github.com/users/mrblueblue/gists{/gist_id}","starred_url":"https://api.github.com/users/mrblueblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrblueblue/subscriptions","organizations_url":"https://api.github.com/users/mrblueblue/orgs","repos_url":"https://api.github.com/users/mrblueblue/repos","events_url":"https://api.github.com/users/mrblueblue/events{/privacy}","received_events_url":"https://api.github.com/users/mrblueblue/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrblueblue/graffiome","description":"Graffiti for the web","fork":true,"url":"https://api.github.com/repos/mrblueblue/graffiome","forks_url":"https://api.github.com/repos/mrblueblue/graffiome/forks","keys_url":"https://api.github.com/repos/mrblueblue/graffiome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrblueblue/graffiome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrblueblue/graffiome/teams","hooks_url":"https://api.github.com/repos/mrblueblue/graffiome/hooks","issue_events_url":"https://api.github.com/repos/mrblueblue/graffiome/issues/events{/number}","events_url":"https://api.github.com/repos/mrblueblue/graffiome/events","assignees_url":"https://api.github.com/repos/mrblueblue/graffiome/assignees{/user}","branches_url":"https://api.github.com/repos/mrblueblue/graffiome/branches{/branch}","tags_url":"https://api.github.com/repos/mrblueblue/graffiome/tags","blobs_url":"https://api.github.com/repos/mrblueblue/graffiome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrblueblue/graffiome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrblueblue/graffiome/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrblueblue/graffiome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrblueblue/graffiome/statuses/{sha}","languages_url":"https://api.github.com/repos/mrblueblue/graffiome/languages","stargazers_url":"https://api.github.com/repos/mrblueblue/graffiome/stargazers","contributors_url":"https://api.github.com/repos/mrblueblue/graffiome/contributors","subscribers_url":"https://api.github.com/repos/mrblueblue/graffiome/subscribers","subscription_url":"https://api.github.com/repos/mrblueblue/graffiome/subscription","commits_url":"https://api.github.com/repos/mrblueblue/graffiome/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrblueblue/graffiome/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrblueblue/graffiome/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrblueblue/graffiome/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrblueblue/graffiome/contents/{+path}","compare_url":"https://api.github.com/repos/mrblueblue/graffiome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrblueblue/graffiome/merges","archive_url":"https://api.github.com/repos/mrblueblue/graffiome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrblueblue/graffiome/downloads","issues_url":"https://api.github.com/repos/mrblueblue/graffiome/issues{/number}","pulls_url":"https://api.github.com/repos/mrblueblue/graffiome/pulls{/number}","milestones_url":"https://api.github.com/repos/mrblueblue/graffiome/milestones{/number}","notifications_url":"https://api.github.com/repos/mrblueblue/graffiome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrblueblue/graffiome/labels{/name}","releases_url":"https://api.github.com/repos/mrblueblue/graffiome/releases{/id}","created_at":"2015-03-11T21:53:25Z","updated_at":"2015-03-12T03:45:41Z","pushed_at":"2015-03-12T22:08:41Z","git_url":"git://github.com/mrblueblue/graffiome.git","ssh_url":"git@github.com:mrblueblue/graffiome.git","clone_url":"https://github.com/mrblueblue/graffiome.git","svn_url":"https://github.com/mrblueblue/graffiome","homepage":null,"size":0,"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":"graffiome:master","ref":"master","sha":"8f82cca11013d673458b7741b6c4b30b26bb218b","user":{"login":"graffiome","id":11431173,"avatar_url":"https://avatars.githubusercontent.com/u/11431173?v=3","gravatar_id":"","url":"https://api.github.com/users/graffiome","html_url":"https://github.com/graffiome","followers_url":"https://api.github.com/users/graffiome/followers","following_url":"https://api.github.com/users/graffiome/following{/other_user}","gists_url":"https://api.github.com/users/graffiome/gists{/gist_id}","starred_url":"https://api.github.com/users/graffiome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graffiome/subscriptions","organizations_url":"https://api.github.com/users/graffiome/orgs","repos_url":"https://api.github.com/users/graffiome/repos","events_url":"https://api.github.com/users/graffiome/events{/privacy}","received_events_url":"https://api.github.com/users/graffiome/received_events","type":"Organization","site_admin":false},"repo":{"id":32042805,"name":"graffiome","full_name":"graffiome/graffiome","owner":{"login":"graffiome","id":11431173,"avatar_url":"https://avatars.githubusercontent.com/u/11431173?v=3","gravatar_id":"","url":"https://api.github.com/users/graffiome","html_url":"https://github.com/graffiome","followers_url":"https://api.github.com/users/graffiome/followers","following_url":"https://api.github.com/users/graffiome/following{/other_user}","gists_url":"https://api.github.com/users/graffiome/gists{/gist_id}","starred_url":"https://api.github.com/users/graffiome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graffiome/subscriptions","organizations_url":"https://api.github.com/users/graffiome/orgs","repos_url":"https://api.github.com/users/graffiome/repos","events_url":"https://api.github.com/users/graffiome/events{/privacy}","received_events_url":"https://api.github.com/users/graffiome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/graffiome/graffiome","description":"Graffiti for the web","fork":false,"url":"https://api.github.com/repos/graffiome/graffiome","forks_url":"https://api.github.com/repos/graffiome/graffiome/forks","keys_url":"https://api.github.com/repos/graffiome/graffiome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/graffiome/graffiome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/graffiome/graffiome/teams","hooks_url":"https://api.github.com/repos/graffiome/graffiome/hooks","issue_events_url":"https://api.github.com/repos/graffiome/graffiome/issues/events{/number}","events_url":"https://api.github.com/repos/graffiome/graffiome/events","assignees_url":"https://api.github.com/repos/graffiome/graffiome/assignees{/user}","branches_url":"https://api.github.com/repos/graffiome/graffiome/branches{/branch}","tags_url":"https://api.github.com/repos/graffiome/graffiome/tags","blobs_url":"https://api.github.com/repos/graffiome/graffiome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/graffiome/graffiome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/graffiome/graffiome/git/refs{/sha}","trees_url":"https://api.github.com/repos/graffiome/graffiome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/graffiome/graffiome/statuses/{sha}","languages_url":"https://api.github.com/repos/graffiome/graffiome/languages","stargazers_url":"https://api.github.com/repos/graffiome/graffiome/stargazers","contributors_url":"https://api.github.com/repos/graffiome/graffiome/contributors","subscribers_url":"https://api.github.com/repos/graffiome/graffiome/subscribers","subscription_url":"https://api.github.com/repos/graffiome/graffiome/subscription","commits_url":"https://api.github.com/repos/graffiome/graffiome/commits{/sha}","git_commits_url":"https://api.github.com/repos/graffiome/graffiome/git/commits{/sha}","comments_url":"https://api.github.com/repos/graffiome/graffiome/comments{/number}","issue_comment_url":"https://api.github.com/repos/graffiome/graffiome/issues/comments{/number}","contents_url":"https://api.github.com/repos/graffiome/graffiome/contents/{+path}","compare_url":"https://api.github.com/repos/graffiome/graffiome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/graffiome/graffiome/merges","archive_url":"https://api.github.com/repos/graffiome/graffiome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/graffiome/graffiome/downloads","issues_url":"https://api.github.com/repos/graffiome/graffiome/issues{/number}","pulls_url":"https://api.github.com/repos/graffiome/graffiome/pulls{/number}","milestones_url":"https://api.github.com/repos/graffiome/graffiome/milestones{/number}","notifications_url":"https://api.github.com/repos/graffiome/graffiome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/graffiome/graffiome/labels{/name}","releases_url":"https://api.github.com/repos/graffiome/graffiome/releases{/id}","created_at":"2015-03-11T21:43:16Z","updated_at":"2015-03-12T21:42:27Z","pushed_at":"2015-03-12T21:42:27Z","git_url":"git://github.com/graffiome/graffiome.git","ssh_url":"git@github.com:graffiome/graffiome.git","clone_url":"https://github.com/graffiome/graffiome.git","svn_url":"https://github.com/graffiome/graffiome","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/graffiome/graffiome/pulls/19"},"html":{"href":"https://github.com/graffiome/graffiome/pull/19"},"issue":{"href":"https://api.github.com/repos/graffiome/graffiome/issues/19"},"comments":{"href":"https://api.github.com/repos/graffiome/graffiome/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/graffiome/graffiome/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/graffiome/graffiome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/graffiome/graffiome/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/graffiome/graffiome/statuses/7ef2064d0ff867c653d30efabc33a9adb01be94b"}}}}