{"action":"created","comment":{"url":"https://api.github.com/repos/dcposch/browser-laptop/pulls/comments/87101154","pull_request_review_id":7727090,"id":87101154,"diff_hunk":"@@ -137,19 +151,52 @@ let generateBraveManifest = () => {\n     cspDirectives['style-src'] = '\\'self\\' \\'unsafe-inline\\' http://' + devServer\n   }\n \n+  baseManifest.content_security_policy = concatCSP(cspDirectives)\n+\n+  return baseManifest\n+}\n+\n+// Returns the Chromium extension manifest for the torrentExtension\n+// The torrentExtension handles magnet: URLs\n+// Analagous to the PDFJS extension, it shows a special UI for that type of resource\n+let generateTorrentManifest = () => {\n+  let cspDirectives = {\n+    'default-src': '\\'self\\'',\n+    'form-action': '\\'none\\'',\n+    'referrer': 'no-referrer',\n+    'style-src': '\\'self\\' \\'unsafe-inline\\'',\n+    'img-src': '* data: blob:'","path":"app/extensions.js","position":105,"original_position":105,"commit_id":"8b7ed914e7c71b5a9db815d4773bef466f38d150","original_commit_id":"8b7ed914e7c71b5a9db815d4773bef466f38d150","user":{"login":"dcposch","id":169280,"avatar_url":"https://avatars.githubusercontent.com/u/169280?v=3","gravatar_id":"","url":"https://api.github.com/users/dcposch","html_url":"https://github.com/dcposch","followers_url":"https://api.github.com/users/dcposch/followers","following_url":"https://api.github.com/users/dcposch/following{/other_user}","gists_url":"https://api.github.com/users/dcposch/gists{/gist_id}","starred_url":"https://api.github.com/users/dcposch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcposch/subscriptions","organizations_url":"https://api.github.com/users/dcposch/orgs","repos_url":"https://api.github.com/users/dcposch/repos","events_url":"https://api.github.com/users/dcposch/events{/privacy}","received_events_url":"https://api.github.com/users/dcposch/received_events","type":"User","site_admin":false},"body":"done","created_at":"2016-11-08T22:44:18Z","updated_at":"2016-11-08T22:44:18Z","html_url":"https://github.com/dcposch/browser-laptop/pull/3#discussion_r87101154","pull_request_url":"https://api.github.com/repos/dcposch/browser-laptop/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/dcposch/browser-laptop/pulls/comments/87101154"},"html":{"href":"https://github.com/dcposch/browser-laptop/pull/3#discussion_r87101154"},"pull_request":{"href":"https://api.github.com/repos/dcposch/browser-laptop/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/dcposch/browser-laptop/pulls/3","id":92697881,"html_url":"https://github.com/dcposch/browser-laptop/pull/3","diff_url":"https://github.com/dcposch/browser-laptop/pull/3.diff","patch_url":"https://github.com/dcposch/browser-laptop/pull/3.patch","issue_url":"https://api.github.com/repos/dcposch/browser-laptop/issues/3","number":3,"state":"open","locked":false,"title":"[WIP] Move the Torrent Viewer to its own extension","user":{"login":"dcposch","id":169280,"avatar_url":"https://avatars.githubusercontent.com/u/169280?v=3","gravatar_id":"","url":"https://api.github.com/users/dcposch","html_url":"https://github.com/dcposch","followers_url":"https://api.github.com/users/dcposch/followers","following_url":"https://api.github.com/users/dcposch/following{/other_user}","gists_url":"https://api.github.com/users/dcposch/gists{/gist_id}","starred_url":"https://api.github.com/users/dcposch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcposch/subscriptions","organizations_url":"https://api.github.com/users/dcposch/orgs","repos_url":"https://api.github.com/users/dcposch/repos","events_url":"https://api.github.com/users/dcposch/events{/privacy}","received_events_url":"https://api.github.com/users/dcposch/received_events","type":"User","site_admin":false},"body":"Previously, torrent support was implemented in the Brave extension.\r\n\r\n### Questions\r\n- **Dev mode**. The Brave extension does some fancy things in developer mode, including different CSP directives, a separate `index.html`, etc. It feels dirty to copy and paste all that into the torrent extension. Is there a better way? (PS: so far, I've just been running `npm run webpack` every time I make a change in the extensions/ folder.)\r\n- **Permissions**. The WebTorrent extension generally has fewer permissions than the Brave extension. I'll experiment with restricting them some more.\r\n- **Key**. Currently, the Brave extension manifest specifies a key and the torrent extension doesn't. See `generate{Brave,Torrent}Manifest()` in `app/extensions.js`. Since these extensions are bundled with the browser rather than served thru eg. the Chrome app store, what does the key do?\r\n\r\n### Work left to do\r\n- **WebTorrent process**. This just gives webtorrent its own extension. The next step is additionally moving the webtorrent client to its own process, for two reasons: we want a single client instead of one per tab, and we want it to have access to Node APIs.\r\n\r\nLMK if this looks reasonable!\r\n\r\n@diracdeltas @bbondy @brendaneich @feross ","created_at":"2016-11-08T01:17:44Z","updated_at":"2016-11-08T22:44:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbdeaf3277517f556e7decd35d05b6d3e2da805d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dcposch/browser-laptop/pulls/3/commits","review_comments_url":"https://api.github.com/repos/dcposch/browser-laptop/pulls/3/comments","review_comment_url":"https://api.github.com/repos/dcposch/browser-laptop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dcposch/browser-laptop/issues/3/comments","statuses_url":"https://api.github.com/repos/dcposch/browser-laptop/statuses/8b7ed914e7c71b5a9db815d4773bef466f38d150","head":{"label":"dcposch:torrent-ext","ref":"torrent-ext","sha":"8b7ed914e7c71b5a9db815d4773bef466f38d150","user":{"login":"dcposch","id":169280,"avatar_url":"https://avatars.githubusercontent.com/u/169280?v=3","gravatar_id":"","url":"https://api.github.com/users/dcposch","html_url":"https://github.com/dcposch","followers_url":"https://api.github.com/users/dcposch/followers","following_url":"https://api.github.com/users/dcposch/following{/other_user}","gists_url":"https://api.github.com/users/dcposch/gists{/gist_id}","starred_url":"https://api.github.com/users/dcposch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcposch/subscriptions","organizations_url":"https://api.github.com/users/dcposch/orgs","repos_url":"https://api.github.com/users/dcposch/repos","events_url":"https://api.github.com/users/dcposch/events{/privacy}","received_events_url":"https://api.github.com/users/dcposch/received_events","type":"User","site_admin":false},"repo":{"id":72562261,"name":"browser-laptop","full_name":"dcposch/browser-laptop","owner":{"login":"dcposch","id":169280,"avatar_url":"https://avatars.githubusercontent.com/u/169280?v=3","gravatar_id":"","url":"https://api.github.com/users/dcposch","html_url":"https://github.com/dcposch","followers_url":"https://api.github.com/users/dcposch/followers","following_url":"https://api.github.com/users/dcposch/following{/other_user}","gists_url":"https://api.github.com/users/dcposch/gists{/gist_id}","starred_url":"https://api.github.com/users/dcposch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcposch/subscriptions","organizations_url":"https://api.github.com/users/dcposch/orgs","repos_url":"https://api.github.com/users/dcposch/repos","events_url":"https://api.github.com/users/dcposch/events{/privacy}","received_events_url":"https://api.github.com/users/dcposch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dcposch/browser-laptop","description":"Brave browser for Desktop and Laptop computers running Windows, OSX, and Linux","fork":true,"url":"https://api.github.com/repos/dcposch/browser-laptop","forks_url":"https://api.github.com/repos/dcposch/browser-laptop/forks","keys_url":"https://api.github.com/repos/dcposch/browser-laptop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcposch/browser-laptop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcposch/browser-laptop/teams","hooks_url":"https://api.github.com/repos/dcposch/browser-laptop/hooks","issue_events_url":"https://api.github.com/repos/dcposch/browser-laptop/issues/events{/number}","events_url":"https://api.github.com/repos/dcposch/browser-laptop/events","assignees_url":"https://api.github.com/repos/dcposch/browser-laptop/assignees{/user}","branches_url":"https://api.github.com/repos/dcposch/browser-laptop/branches{/branch}","tags_url":"https://api.github.com/repos/dcposch/browser-laptop/tags","blobs_url":"https://api.github.com/repos/dcposch/browser-laptop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcposch/browser-laptop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcposch/browser-laptop/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcposch/browser-laptop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcposch/browser-laptop/statuses/{sha}","languages_url":"https://api.github.com/repos/dcposch/browser-laptop/languages","stargazers_url":"https://api.github.com/repos/dcposch/browser-laptop/stargazers","contributors_url":"https://api.github.com/repos/dcposch/browser-laptop/contributors","subscribers_url":"https://api.github.com/repos/dcposch/browser-laptop/subscribers","subscription_url":"https://api.github.com/repos/dcposch/browser-laptop/subscription","commits_url":"https://api.github.com/repos/dcposch/browser-laptop/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcposch/browser-laptop/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcposch/browser-laptop/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcposch/browser-laptop/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcposch/browser-laptop/contents/{+path}","compare_url":"https://api.github.com/repos/dcposch/browser-laptop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcposch/browser-laptop/merges","archive_url":"https://api.github.com/repos/dcposch/browser-laptop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcposch/browser-laptop/downloads","issues_url":"https://api.github.com/repos/dcposch/browser-laptop/issues{/number}","pulls_url":"https://api.github.com/repos/dcposch/browser-laptop/pulls{/number}","milestones_url":"https://api.github.com/repos/dcposch/browser-laptop/milestones{/number}","notifications_url":"https://api.github.com/repos/dcposch/browser-laptop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcposch/browser-laptop/labels{/name}","releases_url":"https://api.github.com/repos/dcposch/browser-laptop/releases{/id}","deployments_url":"https://api.github.com/repos/dcposch/browser-laptop/deployments","created_at":"2016-11-01T18:00:22Z","updated_at":"2016-11-04T02:36:48Z","pushed_at":"2016-11-08T21:17:05Z","git_url":"git://github.com/dcposch/browser-laptop.git","ssh_url":"git@github.com:dcposch/browser-laptop.git","clone_url":"https://github.com/dcposch/browser-laptop.git","svn_url":"https://github.com/dcposch/browser-laptop","homepage":"https://www.brave.com","size":40335,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"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"}},"base":{"label":"dcposch:master","ref":"master","sha":"f9d8d417d2b7318de1b2293d5191ca0883e4c771","user":{"login":"dcposch","id":169280,"avatar_url":"https://avatars.githubusercontent.com/u/169280?v=3","gravatar_id":"","url":"https://api.github.com/users/dcposch","html_url":"https://github.com/dcposch","followers_url":"https://api.github.com/users/dcposch/followers","following_url":"https://api.github.com/users/dcposch/following{/other_user}","gists_url":"https://api.github.com/users/dcposch/gists{/gist_id}","starred_url":"https://api.github.com/users/dcposch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcposch/subscriptions","organizations_url":"https://api.github.com/users/dcposch/orgs","repos_url":"https://api.github.com/users/dcposch/repos","events_url":"https://api.github.com/users/dcposch/events{/privacy}","received_events_url":"https://api.github.com/users/dcposch/received_events","type":"User","site_admin":false},"repo":{"id":72562261,"name":"browser-laptop","full_name":"dcposch/browser-laptop","owner":{"login":"dcposch","id":169280,"avatar_url":"https://avatars.githubusercontent.com/u/169280?v=3","gravatar_id":"","url":"https://api.github.com/users/dcposch","html_url":"https://github.com/dcposch","followers_url":"https://api.github.com/users/dcposch/followers","following_url":"https://api.github.com/users/dcposch/following{/other_user}","gists_url":"https://api.github.com/users/dcposch/gists{/gist_id}","starred_url":"https://api.github.com/users/dcposch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcposch/subscriptions","organizations_url":"https://api.github.com/users/dcposch/orgs","repos_url":"https://api.github.com/users/dcposch/repos","events_url":"https://api.github.com/users/dcposch/events{/privacy}","received_events_url":"https://api.github.com/users/dcposch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dcposch/browser-laptop","description":"Brave browser for Desktop and Laptop computers running Windows, OSX, and Linux","fork":true,"url":"https://api.github.com/repos/dcposch/browser-laptop","forks_url":"https://api.github.com/repos/dcposch/browser-laptop/forks","keys_url":"https://api.github.com/repos/dcposch/browser-laptop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcposch/browser-laptop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcposch/browser-laptop/teams","hooks_url":"https://api.github.com/repos/dcposch/browser-laptop/hooks","issue_events_url":"https://api.github.com/repos/dcposch/browser-laptop/issues/events{/number}","events_url":"https://api.github.com/repos/dcposch/browser-laptop/events","assignees_url":"https://api.github.com/repos/dcposch/browser-laptop/assignees{/user}","branches_url":"https://api.github.com/repos/dcposch/browser-laptop/branches{/branch}","tags_url":"https://api.github.com/repos/dcposch/browser-laptop/tags","blobs_url":"https://api.github.com/repos/dcposch/browser-laptop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcposch/browser-laptop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcposch/browser-laptop/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcposch/browser-laptop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcposch/browser-laptop/statuses/{sha}","languages_url":"https://api.github.com/repos/dcposch/browser-laptop/languages","stargazers_url":"https://api.github.com/repos/dcposch/browser-laptop/stargazers","contributors_url":"https://api.github.com/repos/dcposch/browser-laptop/contributors","subscribers_url":"https://api.github.com/repos/dcposch/browser-laptop/subscribers","subscription_url":"https://api.github.com/repos/dcposch/browser-laptop/subscription","commits_url":"https://api.github.com/repos/dcposch/browser-laptop/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcposch/browser-laptop/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcposch/browser-laptop/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcposch/browser-laptop/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcposch/browser-laptop/contents/{+path}","compare_url":"https://api.github.com/repos/dcposch/browser-laptop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcposch/browser-laptop/merges","archive_url":"https://api.github.com/repos/dcposch/browser-laptop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcposch/browser-laptop/downloads","issues_url":"https://api.github.com/repos/dcposch/browser-laptop/issues{/number}","pulls_url":"https://api.github.com/repos/dcposch/browser-laptop/pulls{/number}","milestones_url":"https://api.github.com/repos/dcposch/browser-laptop/milestones{/number}","notifications_url":"https://api.github.com/repos/dcposch/browser-laptop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcposch/browser-laptop/labels{/name}","releases_url":"https://api.github.com/repos/dcposch/browser-laptop/releases{/id}","deployments_url":"https://api.github.com/repos/dcposch/browser-laptop/deployments","created_at":"2016-11-01T18:00:22Z","updated_at":"2016-11-04T02:36:48Z","pushed_at":"2016-11-08T21:17:05Z","git_url":"git://github.com/dcposch/browser-laptop.git","ssh_url":"git@github.com:dcposch/browser-laptop.git","clone_url":"https://github.com/dcposch/browser-laptop.git","svn_url":"https://github.com/dcposch/browser-laptop","homepage":"https://www.brave.com","size":40335,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"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/dcposch/browser-laptop/pulls/3"},"html":{"href":"https://github.com/dcposch/browser-laptop/pull/3"},"issue":{"href":"https://api.github.com/repos/dcposch/browser-laptop/issues/3"},"comments":{"href":"https://api.github.com/repos/dcposch/browser-laptop/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/dcposch/browser-laptop/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/dcposch/browser-laptop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dcposch/browser-laptop/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/dcposch/browser-laptop/statuses/8b7ed914e7c71b5a9db815d4773bef466f38d150"}}}}
{"actor":{"display_login":"dcposch"}}