{"action":"created","comment":{"url":"https://api.github.com/repos/privly/privly-chrome/pulls/comments/30473163","id":30473163,"diff_hunk":"@@ -20,6 +20,7 @@\n       \"images/logo_48.png\",\n       \"privly-applications/PlainPost/show.html\",\n       \"privly-applications/Message/show.html\",\n+      \"privly-applications/Message/new_embed.html\",","path":"manifest.json","position":4,"original_position":4,"commit_id":"781166a7d87170f3f447dd0ee7582516d31a3c47","original_commit_id":"781166a7d87170f3f447dd0ee7582516d31a3c47","user":{"login":"smcgregor","id":64780,"avatar_url":"https://avatars.githubusercontent.com/u/64780?v=3","gravatar_id":"","url":"https://api.github.com/users/smcgregor","html_url":"https://github.com/smcgregor","followers_url":"https://api.github.com/users/smcgregor/followers","following_url":"https://api.github.com/users/smcgregor/following{/other_user}","gists_url":"https://api.github.com/users/smcgregor/gists{/gist_id}","starred_url":"https://api.github.com/users/smcgregor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smcgregor/subscriptions","organizations_url":"https://api.github.com/users/smcgregor/orgs","repos_url":"https://api.github.com/users/smcgregor/repos","events_url":"https://api.github.com/users/smcgregor/events{/privacy}","received_events_url":"https://api.github.com/users/smcgregor/received_events","type":"User","site_admin":false},"body":"I am pulling this now to start with testing, but I think this is the line we most need to talk about. Currently the show.html application that gets injected is the same one that is viewed when the user clicks through to view it. I think this may be the proper approach for the new.html application as well, but I need to dive into the code more to be certain.","created_at":"2015-05-17T18:36:27Z","updated_at":"2015-05-17T18:36:27Z","html_url":"https://github.com/privly/privly-chrome/pull/120#discussion_r30473163","pull_request_url":"https://api.github.com/repos/privly/privly-chrome/pulls/120","_links":{"self":{"href":"https://api.github.com/repos/privly/privly-chrome/pulls/comments/30473163"},"html":{"href":"https://github.com/privly/privly-chrome/pull/120#discussion_r30473163"},"pull_request":{"href":"https://api.github.com/repos/privly/privly-chrome/pulls/120"}}},"pull_request":{"url":"https://api.github.com/repos/privly/privly-chrome/pulls/120","id":35100260,"html_url":"https://github.com/privly/privly-chrome/pull/120","diff_url":"https://github.com/privly/privly-chrome/pull/120.diff","patch_url":"https://github.com/privly/privly-chrome/pull/120.patch","issue_url":"https://api.github.com/repos/privly/privly-chrome/issues/120","number":120,"state":"open","locked":false,"title":"Embed-posting","user":{"login":"SummerWish","id":1916485,"avatar_url":"https://avatars.githubusercontent.com/u/1916485?v=3","gravatar_id":"","url":"https://api.github.com/users/SummerWish","html_url":"https://github.com/SummerWish","followers_url":"https://api.github.com/users/SummerWish/followers","following_url":"https://api.github.com/users/SummerWish/following{/other_user}","gists_url":"https://api.github.com/users/SummerWish/gists{/gist_id}","starred_url":"https://api.github.com/users/SummerWish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SummerWish/subscriptions","organizations_url":"https://api.github.com/users/SummerWish/orgs","repos_url":"https://api.github.com/users/SummerWish/repos","events_url":"https://api.github.com/users/SummerWish/events{/privacy}","received_events_url":"https://api.github.com/users/SummerWish/received_events","type":"User","site_admin":false},"body":"Embed-posting is part of seamless posting. In short, it shows a model dialog on the host page for user to compose Privly messages, as well as trying to forward some keyboard events to the original form, which is necessary in seamless posting.\r\n\r\nThis PR includes background scripts and content scripts. Embed-posting also requires a Privly application page which is used to present UI. PR of privly-application: https://github.com/privly/privly-applications/pull/243 .\r\n\r\nThis PR also includes (and based on) commits of implementing a new Privly Posting button introduced in #101 .\r\n\r\nHere are the details of this functionality:\r\n\r\n- When user [clicks Privly posting button](https://github.com/privly/privly-chrome/pull/120/files#diff-d38f979261233fa789d1599f4b6f4feaR179) or the [context menu item](https://github.com/privly/privly-chrome/pull/120/files#diff-3071a3db4fa3de9a687b81f65d20ff88R544), the extension will [set up an embeded iframe](https://github.com/privly/privly-chrome/pull/120/files#diff-3071a3db4fa3de9a687b81f65d20ff88R553), showing embed-posting privly application.\r\n  (If user clicks Privly posting button in an iframe, the embed-posting iframe will be [shown in the top frame](https://github.com/privly/privly-chrome/pull/120/files#diff-c10b9ecf165a9ce22d639631fdf3a807R26))\r\n\r\n- The embed-posting privly application will first [test connections](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR512) to check whether user has logged in.\r\n  If user is not logged in, it will [ask user to log in](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR428). (Extension will [pop up a new window for logging in](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR457) if user clicks the login link.)\r\n\r\n![not logged in](https://cloud.githubusercontent.com/assets/1916485/7605064/d4d0dcc0-f97d-11e4-8ef1-9d8811832e6d.png)\r\n\r\n- [After logging in](https://github.com/privly/privly-chrome/pull/120/files#diff-c10b9ecf165a9ce22d639631fdf3a807R33), or if the user is already logged in, the app will [create a Privly message link](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR405) with empty content and [insert it to the editable element](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR408). Users are allowed to write Privly message in the iframe.\r\n\r\n![write Privly message](https://cloud.githubusercontent.com/assets/1916485/7605262/0f758f90-f980-11e4-96b3-8d26bb577d4e.png)\r\n\r\n- If the form of the editable element [contains a submit button](https://github.com/privly/privly-chrome/pull/120/files#diff-3071a3db4fa3de9a687b81f65d20ff88R363), it will [appear in the writing UI](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR387). When user clicks it, the Privly message [will be saved](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR476) and [the original submit button will be clicked](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR146) to submit the form in the host page. Otherwise [a Done button will appear](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR390), and [it just save Privly message and close the iframe](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR470) if user clicks it.\r\n\r\n- User can click cancel to [close the iframe(embed posting)](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR465). The link inserted to the editable element [will be reverted](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR463) and the Privly link [will be destroyed](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR461).\r\n\r\n- User can press ENTER to insert a new line as well as [save the message](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR489). The ENTER event [will be forwarded](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR490) to the original editable element, which may cause the host page to submit the form. This is useful for chatting applications. For example, in Facebook chat, user needn't clicks Done to return to the host page. They can just press ENTER to send the Privly encrypted message as if there is no Privly at all. In this case, when the original form is submitted, [the dialog will be automatically closed](https://github.com/privly/privly-applications/pull/243/files#diff-9be447f7a87bb14438fafa3f0d4cc35dR362).\r\n\r\n\r\nCurrently it works on most of the textarea and content editable elements. Keyboard forwarding works well in Facebook Chat, Facebook Status, Google Hangouts, Twitter and many other websites. However this PR not works in Outlook.com. I'm still working on it.","created_at":"2015-05-11T06:16:11Z","updated_at":"2015-05-17T18:36:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36d48f2851bd981e3235edf1fef900ddc8f29b48","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/privly/privly-chrome/pulls/120/commits","review_comments_url":"https://api.github.com/repos/privly/privly-chrome/pulls/120/comments","review_comment_url":"https://api.github.com/repos/privly/privly-chrome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/privly/privly-chrome/issues/120/comments","statuses_url":"https://api.github.com/repos/privly/privly-chrome/statuses/781166a7d87170f3f447dd0ee7582516d31a3c47","head":{"label":"SummerWish:embed-posting","ref":"embed-posting","sha":"781166a7d87170f3f447dd0ee7582516d31a3c47","user":{"login":"SummerWish","id":1916485,"avatar_url":"https://avatars.githubusercontent.com/u/1916485?v=3","gravatar_id":"","url":"https://api.github.com/users/SummerWish","html_url":"https://github.com/SummerWish","followers_url":"https://api.github.com/users/SummerWish/followers","following_url":"https://api.github.com/users/SummerWish/following{/other_user}","gists_url":"https://api.github.com/users/SummerWish/gists{/gist_id}","starred_url":"https://api.github.com/users/SummerWish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SummerWish/subscriptions","organizations_url":"https://api.github.com/users/SummerWish/orgs","repos_url":"https://api.github.com/users/SummerWish/repos","events_url":"https://api.github.com/users/SummerWish/events{/privacy}","received_events_url":"https://api.github.com/users/SummerWish/received_events","type":"User","site_admin":false},"repo":{"id":31711213,"name":"privly-chrome","full_name":"SummerWish/privly-chrome","owner":{"login":"SummerWish","id":1916485,"avatar_url":"https://avatars.githubusercontent.com/u/1916485?v=3","gravatar_id":"","url":"https://api.github.com/users/SummerWish","html_url":"https://github.com/SummerWish","followers_url":"https://api.github.com/users/SummerWish/followers","following_url":"https://api.github.com/users/SummerWish/following{/other_user}","gists_url":"https://api.github.com/users/SummerWish/gists{/gist_id}","starred_url":"https://api.github.com/users/SummerWish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SummerWish/subscriptions","organizations_url":"https://api.github.com/users/SummerWish/orgs","repos_url":"https://api.github.com/users/SummerWish/repos","events_url":"https://api.github.com/users/SummerWish/events{/privacy}","received_events_url":"https://api.github.com/users/SummerWish/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SummerWish/privly-chrome","description":"Official Privly Browser Extension for Google Chrome - Allows for Viewing and Posting Content on Any Website Without the Host Site Having Access","fork":true,"url":"https://api.github.com/repos/SummerWish/privly-chrome","forks_url":"https://api.github.com/repos/SummerWish/privly-chrome/forks","keys_url":"https://api.github.com/repos/SummerWish/privly-chrome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SummerWish/privly-chrome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SummerWish/privly-chrome/teams","hooks_url":"https://api.github.com/repos/SummerWish/privly-chrome/hooks","issue_events_url":"https://api.github.com/repos/SummerWish/privly-chrome/issues/events{/number}","events_url":"https://api.github.com/repos/SummerWish/privly-chrome/events","assignees_url":"https://api.github.com/repos/SummerWish/privly-chrome/assignees{/user}","branches_url":"https://api.github.com/repos/SummerWish/privly-chrome/branches{/branch}","tags_url":"https://api.github.com/repos/SummerWish/privly-chrome/tags","blobs_url":"https://api.github.com/repos/SummerWish/privly-chrome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SummerWish/privly-chrome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SummerWish/privly-chrome/git/refs{/sha}","trees_url":"https://api.github.com/repos/SummerWish/privly-chrome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SummerWish/privly-chrome/statuses/{sha}","languages_url":"https://api.github.com/repos/SummerWish/privly-chrome/languages","stargazers_url":"https://api.github.com/repos/SummerWish/privly-chrome/stargazers","contributors_url":"https://api.github.com/repos/SummerWish/privly-chrome/contributors","subscribers_url":"https://api.github.com/repos/SummerWish/privly-chrome/subscribers","subscription_url":"https://api.github.com/repos/SummerWish/privly-chrome/subscription","commits_url":"https://api.github.com/repos/SummerWish/privly-chrome/commits{/sha}","git_commits_url":"https://api.github.com/repos/SummerWish/privly-chrome/git/commits{/sha}","comments_url":"https://api.github.com/repos/SummerWish/privly-chrome/comments{/number}","issue_comment_url":"https://api.github.com/repos/SummerWish/privly-chrome/issues/comments{/number}","contents_url":"https://api.github.com/repos/SummerWish/privly-chrome/contents/{+path}","compare_url":"https://api.github.com/repos/SummerWish/privly-chrome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SummerWish/privly-chrome/merges","archive_url":"https://api.github.com/repos/SummerWish/privly-chrome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SummerWish/privly-chrome/downloads","issues_url":"https://api.github.com/repos/SummerWish/privly-chrome/issues{/number}","pulls_url":"https://api.github.com/repos/SummerWish/privly-chrome/pulls{/number}","milestones_url":"https://api.github.com/repos/SummerWish/privly-chrome/milestones{/number}","notifications_url":"https://api.github.com/repos/SummerWish/privly-chrome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SummerWish/privly-chrome/labels{/name}","releases_url":"https://api.github.com/repos/SummerWish/privly-chrome/releases{/id}","created_at":"2015-03-05T11:42:56Z","updated_at":"2015-03-31T07:32:54Z","pushed_at":"2015-05-16T05:27:17Z","git_url":"git://github.com/SummerWish/privly-chrome.git","ssh_url":"git@github.com:SummerWish/privly-chrome.git","clone_url":"https://github.com/SummerWish/privly-chrome.git","svn_url":"https://github.com/SummerWish/privly-chrome","homepage":"https://priv.ly","size":7128,"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":"privly:develop","ref":"develop","sha":"7ae8ec10150350fe4e5130944b8b669bbcac5cf6","user":{"login":"privly","id":1761186,"avatar_url":"https://avatars.githubusercontent.com/u/1761186?v=3","gravatar_id":"","url":"https://api.github.com/users/privly","html_url":"https://github.com/privly","followers_url":"https://api.github.com/users/privly/followers","following_url":"https://api.github.com/users/privly/following{/other_user}","gists_url":"https://api.github.com/users/privly/gists{/gist_id}","starred_url":"https://api.github.com/users/privly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privly/subscriptions","organizations_url":"https://api.github.com/users/privly/orgs","repos_url":"https://api.github.com/users/privly/repos","events_url":"https://api.github.com/users/privly/events{/privacy}","received_events_url":"https://api.github.com/users/privly/received_events","type":"Organization","site_admin":false},"repo":{"id":3260531,"name":"privly-chrome","full_name":"privly/privly-chrome","owner":{"login":"privly","id":1761186,"avatar_url":"https://avatars.githubusercontent.com/u/1761186?v=3","gravatar_id":"","url":"https://api.github.com/users/privly","html_url":"https://github.com/privly","followers_url":"https://api.github.com/users/privly/followers","following_url":"https://api.github.com/users/privly/following{/other_user}","gists_url":"https://api.github.com/users/privly/gists{/gist_id}","starred_url":"https://api.github.com/users/privly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privly/subscriptions","organizations_url":"https://api.github.com/users/privly/orgs","repos_url":"https://api.github.com/users/privly/repos","events_url":"https://api.github.com/users/privly/events{/privacy}","received_events_url":"https://api.github.com/users/privly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/privly/privly-chrome","description":"Official Privly Browser Extension for Google Chrome - Allows for Viewing and Posting Content on Any Website Without the Host Site Having Access","fork":false,"url":"https://api.github.com/repos/privly/privly-chrome","forks_url":"https://api.github.com/repos/privly/privly-chrome/forks","keys_url":"https://api.github.com/repos/privly/privly-chrome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/privly/privly-chrome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/privly/privly-chrome/teams","hooks_url":"https://api.github.com/repos/privly/privly-chrome/hooks","issue_events_url":"https://api.github.com/repos/privly/privly-chrome/issues/events{/number}","events_url":"https://api.github.com/repos/privly/privly-chrome/events","assignees_url":"https://api.github.com/repos/privly/privly-chrome/assignees{/user}","branches_url":"https://api.github.com/repos/privly/privly-chrome/branches{/branch}","tags_url":"https://api.github.com/repos/privly/privly-chrome/tags","blobs_url":"https://api.github.com/repos/privly/privly-chrome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/privly/privly-chrome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/privly/privly-chrome/git/refs{/sha}","trees_url":"https://api.github.com/repos/privly/privly-chrome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/privly/privly-chrome/statuses/{sha}","languages_url":"https://api.github.com/repos/privly/privly-chrome/languages","stargazers_url":"https://api.github.com/repos/privly/privly-chrome/stargazers","contributors_url":"https://api.github.com/repos/privly/privly-chrome/contributors","subscribers_url":"https://api.github.com/repos/privly/privly-chrome/subscribers","subscription_url":"https://api.github.com/repos/privly/privly-chrome/subscription","commits_url":"https://api.github.com/repos/privly/privly-chrome/commits{/sha}","git_commits_url":"https://api.github.com/repos/privly/privly-chrome/git/commits{/sha}","comments_url":"https://api.github.com/repos/privly/privly-chrome/comments{/number}","issue_comment_url":"https://api.github.com/repos/privly/privly-chrome/issues/comments{/number}","contents_url":"https://api.github.com/repos/privly/privly-chrome/contents/{+path}","compare_url":"https://api.github.com/repos/privly/privly-chrome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/privly/privly-chrome/merges","archive_url":"https://api.github.com/repos/privly/privly-chrome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/privly/privly-chrome/downloads","issues_url":"https://api.github.com/repos/privly/privly-chrome/issues{/number}","pulls_url":"https://api.github.com/repos/privly/privly-chrome/pulls{/number}","milestones_url":"https://api.github.com/repos/privly/privly-chrome/milestones{/number}","notifications_url":"https://api.github.com/repos/privly/privly-chrome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/privly/privly-chrome/labels{/name}","releases_url":"https://api.github.com/repos/privly/privly-chrome/releases{/id}","created_at":"2012-01-24T22:39:26Z","updated_at":"2015-05-14T09:15:24Z","pushed_at":"2015-05-16T22:28:54Z","git_url":"git://github.com/privly/privly-chrome.git","ssh_url":"git@github.com:privly/privly-chrome.git","clone_url":"https://github.com/privly/privly-chrome.git","svn_url":"https://github.com/privly/privly-chrome","homepage":"https://priv.ly","size":8164,"stargazers_count":27,"watchers_count":27,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":19,"forks":35,"open_issues":19,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/privly/privly-chrome/pulls/120"},"html":{"href":"https://github.com/privly/privly-chrome/pull/120"},"issue":{"href":"https://api.github.com/repos/privly/privly-chrome/issues/120"},"comments":{"href":"https://api.github.com/repos/privly/privly-chrome/issues/120/comments"},"review_comments":{"href":"https://api.github.com/repos/privly/privly-chrome/pulls/120/comments"},"review_comment":{"href":"https://api.github.com/repos/privly/privly-chrome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/privly/privly-chrome/pulls/120/commits"},"statuses":{"href":"https://api.github.com/repos/privly/privly-chrome/statuses/781166a7d87170f3f447dd0ee7582516d31a3c47"}}}}