{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments/34512259","id":34512259,"diff_hunk":"@@ -296,14 +296,33 @@ const ShotContext = Class({\n       }\n       this.updateShot();\n     },\n-    copyLink: function () {\n-      clipboard.set(this.shot.viewUrl, \"text\");\n+    copyLink: function (url) {\n+      clipboard.set(url, \"text\");\n       notifications.notify({\n         title: \"Link Copied\",\n         text: \"The link to your shot has been copied to the clipboard.\",\n         iconURL: self.data.url(\"../data/copy.png\")\n       });\n     },\n+    copyImage: function (img) {\n+      clipboard.set(img, \"image\");\n+      notifications.notify({\n+        title: \"Image Copied\",\n+        text: \"Your shot has been copied to the clipboard.\",\n+        iconURL: self.data.url(\"../data/copy.png\")\n+      });\n+    },\n+    copyRich: function (url, img, title) {\n+      // Use \"text\" instead of \"html\" so that pasting into a text area or text editor\n+      // pastes the html instead of the plain text stripped out of the html.\n+      clipboard.set(\n+        `<a href=\"${url}\"><img src=\"${img}\" /><div>${title}</div></a>`, \"text\");","path":"addon/lib/shooter.js","position":26,"original_position":26,"commit_id":"da6569248216e92a10fa36f94cff7b4024ce182a","original_commit_id":"da6569248216e92a10fa36f94cff7b4024ce182a","user":{"login":"fzzzy","id":46048,"avatar_url":"https://avatars.githubusercontent.com/u/46048?v=3","gravatar_id":"","url":"https://api.github.com/users/fzzzy","html_url":"https://github.com/fzzzy","followers_url":"https://api.github.com/users/fzzzy/followers","following_url":"https://api.github.com/users/fzzzy/following{/other_user}","gists_url":"https://api.github.com/users/fzzzy/gists{/gist_id}","starred_url":"https://api.github.com/users/fzzzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzzzy/subscriptions","organizations_url":"https://api.github.com/users/fzzzy/orgs","repos_url":"https://api.github.com/users/fzzzy/repos","events_url":"https://api.github.com/users/fzzzy/events{/privacy}","received_events_url":"https://api.github.com/users/fzzzy/received_events","type":"User","site_admin":false},"body":"I tried \"html\" as the clipboard type, but it didn't work at all. Only the visible text from the html was copied. I'll test it again a bit more with gmail, twitter, facebook, etc.","created_at":"2015-07-13T21:10:07Z","updated_at":"2015-07-13T21:10:07Z","html_url":"https://github.com/mozilla-services/pageshot/pull/560#discussion_r34512259","pull_request_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/560","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments/34512259"},"html":{"href":"https://github.com/mozilla-services/pageshot/pull/560#discussion_r34512259"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/560"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/560","id":39369082,"html_url":"https://github.com/mozilla-services/pageshot/pull/560","diff_url":"https://github.com/mozilla-services/pageshot/pull/560.diff","patch_url":"https://github.com/mozilla-services/pageshot/pull/560.patch","issue_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/560","number":560,"state":"open","locked":false,"title":"r? ianbicking Put in buttons to copy the screenshot and rich html in addition to the copy link button.","user":{"login":"fzzzy","id":46048,"avatar_url":"https://avatars.githubusercontent.com/u/46048?v=3","gravatar_id":"","url":"https://api.github.com/users/fzzzy","html_url":"https://github.com/fzzzy","followers_url":"https://api.github.com/users/fzzzy/followers","following_url":"https://api.github.com/users/fzzzy/following{/other_user}","gists_url":"https://api.github.com/users/fzzzy/gists{/gist_id}","starred_url":"https://api.github.com/users/fzzzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzzzy/subscriptions","organizations_url":"https://api.github.com/users/fzzzy/orgs","repos_url":"https://api.github.com/users/fzzzy/repos","events_url":"https://api.github.com/users/fzzzy/events{/privacy}","received_events_url":"https://api.github.com/users/fzzzy/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-07T13:22:52Z","updated_at":"2015-07-13T21:10:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c373bd5cd53c69c0d371538e8387ee0886f55ea9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/560/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/560/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/560/comments","statuses_url":"https://api.github.com/repos/mozilla-services/pageshot/statuses/da6569248216e92a10fa36f94cff7b4024ce182a","head":{"label":"fzzzy:more-copy-buttons","ref":"more-copy-buttons","sha":"da6569248216e92a10fa36f94cff7b4024ce182a","user":{"login":"fzzzy","id":46048,"avatar_url":"https://avatars.githubusercontent.com/u/46048?v=3","gravatar_id":"","url":"https://api.github.com/users/fzzzy","html_url":"https://github.com/fzzzy","followers_url":"https://api.github.com/users/fzzzy/followers","following_url":"https://api.github.com/users/fzzzy/following{/other_user}","gists_url":"https://api.github.com/users/fzzzy/gists{/gist_id}","starred_url":"https://api.github.com/users/fzzzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzzzy/subscriptions","organizations_url":"https://api.github.com/users/fzzzy/orgs","repos_url":"https://api.github.com/users/fzzzy/repos","events_url":"https://api.github.com/users/fzzzy/events{/privacy}","received_events_url":"https://api.github.com/users/fzzzy/received_events","type":"User","site_admin":false},"repo":{"id":30987633,"name":"pageshot","full_name":"fzzzy/pageshot","owner":{"login":"fzzzy","id":46048,"avatar_url":"https://avatars.githubusercontent.com/u/46048?v=3","gravatar_id":"","url":"https://api.github.com/users/fzzzy","html_url":"https://github.com/fzzzy","followers_url":"https://api.github.com/users/fzzzy/followers","following_url":"https://api.github.com/users/fzzzy/following{/other_user}","gists_url":"https://api.github.com/users/fzzzy/gists{/gist_id}","starred_url":"https://api.github.com/users/fzzzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzzzy/subscriptions","organizations_url":"https://api.github.com/users/fzzzy/orgs","repos_url":"https://api.github.com/users/fzzzy/repos","events_url":"https://api.github.com/users/fzzzy/events{/privacy}","received_events_url":"https://api.github.com/users/fzzzy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fzzzy/pageshot","description":"An experiment in creating better shareable versions of content","fork":true,"url":"https://api.github.com/repos/fzzzy/pageshot","forks_url":"https://api.github.com/repos/fzzzy/pageshot/forks","keys_url":"https://api.github.com/repos/fzzzy/pageshot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fzzzy/pageshot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fzzzy/pageshot/teams","hooks_url":"https://api.github.com/repos/fzzzy/pageshot/hooks","issue_events_url":"https://api.github.com/repos/fzzzy/pageshot/issues/events{/number}","events_url":"https://api.github.com/repos/fzzzy/pageshot/events","assignees_url":"https://api.github.com/repos/fzzzy/pageshot/assignees{/user}","branches_url":"https://api.github.com/repos/fzzzy/pageshot/branches{/branch}","tags_url":"https://api.github.com/repos/fzzzy/pageshot/tags","blobs_url":"https://api.github.com/repos/fzzzy/pageshot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fzzzy/pageshot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fzzzy/pageshot/git/refs{/sha}","trees_url":"https://api.github.com/repos/fzzzy/pageshot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fzzzy/pageshot/statuses/{sha}","languages_url":"https://api.github.com/repos/fzzzy/pageshot/languages","stargazers_url":"https://api.github.com/repos/fzzzy/pageshot/stargazers","contributors_url":"https://api.github.com/repos/fzzzy/pageshot/contributors","subscribers_url":"https://api.github.com/repos/fzzzy/pageshot/subscribers","subscription_url":"https://api.github.com/repos/fzzzy/pageshot/subscription","commits_url":"https://api.github.com/repos/fzzzy/pageshot/commits{/sha}","git_commits_url":"https://api.github.com/repos/fzzzy/pageshot/git/commits{/sha}","comments_url":"https://api.github.com/repos/fzzzy/pageshot/comments{/number}","issue_comment_url":"https://api.github.com/repos/fzzzy/pageshot/issues/comments{/number}","contents_url":"https://api.github.com/repos/fzzzy/pageshot/contents/{+path}","compare_url":"https://api.github.com/repos/fzzzy/pageshot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fzzzy/pageshot/merges","archive_url":"https://api.github.com/repos/fzzzy/pageshot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fzzzy/pageshot/downloads","issues_url":"https://api.github.com/repos/fzzzy/pageshot/issues{/number}","pulls_url":"https://api.github.com/repos/fzzzy/pageshot/pulls{/number}","milestones_url":"https://api.github.com/repos/fzzzy/pageshot/milestones{/number}","notifications_url":"https://api.github.com/repos/fzzzy/pageshot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fzzzy/pageshot/labels{/name}","releases_url":"https://api.github.com/repos/fzzzy/pageshot/releases{/id}","created_at":"2015-02-18T21:21:22Z","updated_at":"2015-05-01T19:45:28Z","pushed_at":"2015-07-08T18:20:09Z","git_url":"git://github.com/fzzzy/pageshot.git","ssh_url":"git@github.com:fzzzy/pageshot.git","clone_url":"https://github.com/fzzzy/pageshot.git","svn_url":"https://github.com/fzzzy/pageshot","homepage":"https://pageshotpages.appspot.com","size":1767,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"mozilla-services:master","ref":"master","sha":"e97ad17d7d9d01a7c494166e5104b88ecdd1752e","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":26788257,"name":"pageshot","full_name":"mozilla-services/pageshot","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/pageshot","description":"An experiment in creating better shareable versions of content","fork":false,"url":"https://api.github.com/repos/mozilla-services/pageshot","forks_url":"https://api.github.com/repos/mozilla-services/pageshot/forks","keys_url":"https://api.github.com/repos/mozilla-services/pageshot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/pageshot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/pageshot/teams","hooks_url":"https://api.github.com/repos/mozilla-services/pageshot/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/pageshot/events","assignees_url":"https://api.github.com/repos/mozilla-services/pageshot/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/pageshot/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/pageshot/tags","blobs_url":"https://api.github.com/repos/mozilla-services/pageshot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/pageshot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/pageshot/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/pageshot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/pageshot/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/pageshot/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/pageshot/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/pageshot/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/pageshot/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/pageshot/subscription","commits_url":"https://api.github.com/repos/mozilla-services/pageshot/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/pageshot/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/pageshot/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/pageshot/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/pageshot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/pageshot/merges","archive_url":"https://api.github.com/repos/mozilla-services/pageshot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/pageshot/downloads","issues_url":"https://api.github.com/repos/mozilla-services/pageshot/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/pageshot/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/pageshot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/pageshot/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/pageshot/releases{/id}","created_at":"2014-11-18T02:28:36Z","updated_at":"2015-06-29T18:45:36Z","pushed_at":"2015-07-08T16:09:46Z","git_url":"git://github.com/mozilla-services/pageshot.git","ssh_url":"git@github.com:mozilla-services/pageshot.git","clone_url":"https://github.com/mozilla-services/pageshot.git","svn_url":"https://github.com/mozilla-services/pageshot","homepage":"https://pageshot.dev.mozaws.net","size":2450,"stargazers_count":37,"watchers_count":37,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":165,"forks":6,"open_issues":165,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/560"},"html":{"href":"https://github.com/mozilla-services/pageshot/pull/560"},"issue":{"href":"https://api.github.com/repos/mozilla-services/pageshot/issues/560"},"comments":{"href":"https://api.github.com/repos/mozilla-services/pageshot/issues/560/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/560/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/560/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/pageshot/statuses/da6569248216e92a10fa36f94cff7b4024ce182a"}}}}