{"action":"created","comment":{"url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/comments/80134756","id":80134756,"diff_hunk":"@@ -0,0 +1,47 @@\n+/*\n+ *\n+ * This file is part of Privacy Badger <https://www.eff.org/privacybadger>\n+ * Copyright (C) 2016 Electronic Frontier Foundation\n+ *\n+ * Privacy Badger is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License version 3 as\n+ * published by the Free Software Foundation.\n+ *\n+ * Privacy Badger is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with Privacy Badger.  If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+require.scopes.surrogates = (function() {\n+\n+const db = require('surrogatedb');\n+\n+// gets called within request-blocking listeners\n+// needs to be fast!\n+function getSurrogateURI(script_url, script_hostname) {\n+  // do we have an entry for the script hostname?\n+  if (db.hostnames.hasOwnProperty(script_hostname)) {\n+    const hosts = db.hostnames[script_hostname];","path":"src/surrogates.js","position":28,"original_position":28,"commit_id":"773091e2383f98d9e2601e519af0c3e26e04c99a","original_commit_id":"773091e2383f98d9e2601e519af0c3e26e04c99a","user":{"login":"cooperq","id":64981,"avatar_url":"https://avatars.githubusercontent.com/u/64981?v=3","gravatar_id":"","url":"https://api.github.com/users/cooperq","html_url":"https://github.com/cooperq","followers_url":"https://api.github.com/users/cooperq/followers","following_url":"https://api.github.com/users/cooperq/following{/other_user}","gists_url":"https://api.github.com/users/cooperq/gists{/gist_id}","starred_url":"https://api.github.com/users/cooperq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooperq/subscriptions","organizations_url":"https://api.github.com/users/cooperq/orgs","repos_url":"https://api.github.com/users/cooperq/repos","events_url":"https://api.github.com/users/cooperq/events{/privacy}","received_events_url":"https://api.github.com/users/cooperq/received_events","type":"User","site_admin":false},"body":"needs more doc","created_at":"2016-09-22T20:57:27Z","updated_at":"2016-09-22T20:58:01Z","html_url":"https://github.com/EFForg/privacybadgerchrome/pull/935#discussion_r80134756","pull_request_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/935","_links":{"self":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/comments/80134756"},"html":{"href":"https://github.com/EFForg/privacybadgerchrome/pull/935#discussion_r80134756"},"pull_request":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/935"}}},"pull_request":{"url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/935","id":86062634,"html_url":"https://github.com/EFForg/privacybadgerchrome/pull/935","diff_url":"https://github.com/EFForg/privacybadgerchrome/pull/935.diff","patch_url":"https://github.com/EFForg/privacybadgerchrome/pull/935.patch","issue_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/935","number":935,"state":"open","locked":false,"title":"Surrogates (fixes #400)","user":{"login":"ghostwords","id":794578,"avatar_url":"https://avatars.githubusercontent.com/u/794578?v=3","gravatar_id":"","url":"https://api.github.com/users/ghostwords","html_url":"https://github.com/ghostwords","followers_url":"https://api.github.com/users/ghostwords/followers","following_url":"https://api.github.com/users/ghostwords/following{/other_user}","gists_url":"https://api.github.com/users/ghostwords/gists{/gist_id}","starred_url":"https://api.github.com/users/ghostwords/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghostwords/subscriptions","organizations_url":"https://api.github.com/users/ghostwords/orgs","repos_url":"https://api.github.com/users/ghostwords/repos","events_url":"https://api.github.com/users/ghostwords/events{/privacy}","received_events_url":"https://api.github.com/users/ghostwords/received_events","type":"User","site_admin":false},"body":"WIP pull request for #400 \r\n\r\nBesides review, what's left is more surrogates and more testing. We should run some queries against the \"report broken site\" db to get some recent high-profile breakages we can surrogate.","created_at":"2016-09-20T21:47:42Z","updated_at":"2016-09-22T20:58:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22352c87feddf75c08cebb6c74ec59fbf4e0a6f8","assignee":{"login":"cooperq","id":64981,"avatar_url":"https://avatars.githubusercontent.com/u/64981?v=3","gravatar_id":"","url":"https://api.github.com/users/cooperq","html_url":"https://github.com/cooperq","followers_url":"https://api.github.com/users/cooperq/followers","following_url":"https://api.github.com/users/cooperq/following{/other_user}","gists_url":"https://api.github.com/users/cooperq/gists{/gist_id}","starred_url":"https://api.github.com/users/cooperq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooperq/subscriptions","organizations_url":"https://api.github.com/users/cooperq/orgs","repos_url":"https://api.github.com/users/cooperq/repos","events_url":"https://api.github.com/users/cooperq/events{/privacy}","received_events_url":"https://api.github.com/users/cooperq/received_events","type":"User","site_admin":false},"assignees":[{"login":"cooperq","id":64981,"avatar_url":"https://avatars.githubusercontent.com/u/64981?v=3","gravatar_id":"","url":"https://api.github.com/users/cooperq","html_url":"https://github.com/cooperq","followers_url":"https://api.github.com/users/cooperq/followers","following_url":"https://api.github.com/users/cooperq/following{/other_user}","gists_url":"https://api.github.com/users/cooperq/gists{/gist_id}","starred_url":"https://api.github.com/users/cooperq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooperq/subscriptions","organizations_url":"https://api.github.com/users/cooperq/orgs","repos_url":"https://api.github.com/users/cooperq/repos","events_url":"https://api.github.com/users/cooperq/events{/privacy}","received_events_url":"https://api.github.com/users/cooperq/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/EFForg/privacybadgerchrome/milestones/7","html_url":"https://github.com/EFForg/privacybadgerchrome/milestones/Privacy%20Badger%202.0","labels_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/milestones/7/labels","id":1071537,"number":7,"title":"Privacy Badger 2.0","description":"","creator":{"login":"pde","id":479213,"avatar_url":"https://avatars.githubusercontent.com/u/479213?v=3","gravatar_id":"","url":"https://api.github.com/users/pde","html_url":"https://github.com/pde","followers_url":"https://api.github.com/users/pde/followers","following_url":"https://api.github.com/users/pde/following{/other_user}","gists_url":"https://api.github.com/users/pde/gists{/gist_id}","starred_url":"https://api.github.com/users/pde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pde/subscriptions","organizations_url":"https://api.github.com/users/pde/orgs","repos_url":"https://api.github.com/users/pde/repos","events_url":"https://api.github.com/users/pde/events{/privacy}","received_events_url":"https://api.github.com/users/pde/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":28,"state":"open","created_at":"2015-04-17T00:45:30Z","updated_at":"2016-09-21T02:42:30Z","due_on":"2016-10-25T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/935/commits","review_comments_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/935/comments","review_comment_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/935/comments","statuses_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/statuses/773091e2383f98d9e2601e519af0c3e26e04c99a","head":{"label":"EFForg:surrogates","ref":"surrogates","sha":"773091e2383f98d9e2601e519af0c3e26e04c99a","user":{"login":"EFForg","id":2120271,"avatar_url":"https://avatars.githubusercontent.com/u/2120271?v=3","gravatar_id":"","url":"https://api.github.com/users/EFForg","html_url":"https://github.com/EFForg","followers_url":"https://api.github.com/users/EFForg/followers","following_url":"https://api.github.com/users/EFForg/following{/other_user}","gists_url":"https://api.github.com/users/EFForg/gists{/gist_id}","starred_url":"https://api.github.com/users/EFForg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EFForg/subscriptions","organizations_url":"https://api.github.com/users/EFForg/orgs","repos_url":"https://api.github.com/users/EFForg/repos","events_url":"https://api.github.com/users/EFForg/events{/privacy}","received_events_url":"https://api.github.com/users/EFForg/received_events","type":"Organization","site_admin":false},"repo":{"id":11321096,"name":"privacybadgerchrome","full_name":"EFForg/privacybadgerchrome","owner":{"login":"EFForg","id":2120271,"avatar_url":"https://avatars.githubusercontent.com/u/2120271?v=3","gravatar_id":"","url":"https://api.github.com/users/EFForg","html_url":"https://github.com/EFForg","followers_url":"https://api.github.com/users/EFForg/followers","following_url":"https://api.github.com/users/EFForg/following{/other_user}","gists_url":"https://api.github.com/users/EFForg/gists{/gist_id}","starred_url":"https://api.github.com/users/EFForg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EFForg/subscriptions","organizations_url":"https://api.github.com/users/EFForg/orgs","repos_url":"https://api.github.com/users/EFForg/repos","events_url":"https://api.github.com/users/EFForg/events{/privacy}","received_events_url":"https://api.github.com/users/EFForg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EFForg/privacybadgerchrome","description":"Chrome version of Privacy Badger based on AdBlock Plus","fork":false,"url":"https://api.github.com/repos/EFForg/privacybadgerchrome","forks_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/forks","keys_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/teams","hooks_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/hooks","issue_events_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/events{/number}","events_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/events","assignees_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/assignees{/user}","branches_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/branches{/branch}","tags_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/tags","blobs_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/git/refs{/sha}","trees_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/statuses/{sha}","languages_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/languages","stargazers_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/stargazers","contributors_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/contributors","subscribers_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/subscribers","subscription_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/subscription","commits_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/commits{/sha}","git_commits_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/git/commits{/sha}","comments_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/comments{/number}","issue_comment_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/comments{/number}","contents_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/contents/{+path}","compare_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/merges","archive_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/downloads","issues_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues{/number}","pulls_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls{/number}","milestones_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/milestones{/number}","notifications_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/labels{/name}","releases_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/releases{/id}","deployments_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/deployments","created_at":"2013-07-10T18:59:11Z","updated_at":"2016-09-17T22:45:35Z","pushed_at":"2016-09-22T19:06:52Z","git_url":"git://github.com/EFForg/privacybadgerchrome.git","ssh_url":"git@github.com:EFForg/privacybadgerchrome.git","clone_url":"https://github.com/EFForg/privacybadgerchrome.git","svn_url":"https://github.com/EFForg/privacybadgerchrome","homepage":null,"size":18676,"stargazers_count":391,"watchers_count":391,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":88,"mirror_url":null,"open_issues_count":94,"forks":88,"open_issues":94,"watchers":391,"default_branch":"master"}},"base":{"label":"EFForg:master","ref":"master","sha":"4e52aa9dc0fa453127195b13f66cd005056fef72","user":{"login":"EFForg","id":2120271,"avatar_url":"https://avatars.githubusercontent.com/u/2120271?v=3","gravatar_id":"","url":"https://api.github.com/users/EFForg","html_url":"https://github.com/EFForg","followers_url":"https://api.github.com/users/EFForg/followers","following_url":"https://api.github.com/users/EFForg/following{/other_user}","gists_url":"https://api.github.com/users/EFForg/gists{/gist_id}","starred_url":"https://api.github.com/users/EFForg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EFForg/subscriptions","organizations_url":"https://api.github.com/users/EFForg/orgs","repos_url":"https://api.github.com/users/EFForg/repos","events_url":"https://api.github.com/users/EFForg/events{/privacy}","received_events_url":"https://api.github.com/users/EFForg/received_events","type":"Organization","site_admin":false},"repo":{"id":11321096,"name":"privacybadgerchrome","full_name":"EFForg/privacybadgerchrome","owner":{"login":"EFForg","id":2120271,"avatar_url":"https://avatars.githubusercontent.com/u/2120271?v=3","gravatar_id":"","url":"https://api.github.com/users/EFForg","html_url":"https://github.com/EFForg","followers_url":"https://api.github.com/users/EFForg/followers","following_url":"https://api.github.com/users/EFForg/following{/other_user}","gists_url":"https://api.github.com/users/EFForg/gists{/gist_id}","starred_url":"https://api.github.com/users/EFForg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EFForg/subscriptions","organizations_url":"https://api.github.com/users/EFForg/orgs","repos_url":"https://api.github.com/users/EFForg/repos","events_url":"https://api.github.com/users/EFForg/events{/privacy}","received_events_url":"https://api.github.com/users/EFForg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EFForg/privacybadgerchrome","description":"Chrome version of Privacy Badger based on AdBlock Plus","fork":false,"url":"https://api.github.com/repos/EFForg/privacybadgerchrome","forks_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/forks","keys_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/teams","hooks_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/hooks","issue_events_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/events{/number}","events_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/events","assignees_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/assignees{/user}","branches_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/branches{/branch}","tags_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/tags","blobs_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/git/refs{/sha}","trees_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/statuses/{sha}","languages_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/languages","stargazers_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/stargazers","contributors_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/contributors","subscribers_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/subscribers","subscription_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/subscription","commits_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/commits{/sha}","git_commits_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/git/commits{/sha}","comments_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/comments{/number}","issue_comment_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/comments{/number}","contents_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/contents/{+path}","compare_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/merges","archive_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/downloads","issues_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues{/number}","pulls_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls{/number}","milestones_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/milestones{/number}","notifications_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/labels{/name}","releases_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/releases{/id}","deployments_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/deployments","created_at":"2013-07-10T18:59:11Z","updated_at":"2016-09-17T22:45:35Z","pushed_at":"2016-09-22T19:06:52Z","git_url":"git://github.com/EFForg/privacybadgerchrome.git","ssh_url":"git@github.com:EFForg/privacybadgerchrome.git","clone_url":"https://github.com/EFForg/privacybadgerchrome.git","svn_url":"https://github.com/EFForg/privacybadgerchrome","homepage":null,"size":18676,"stargazers_count":391,"watchers_count":391,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":88,"mirror_url":null,"open_issues_count":94,"forks":88,"open_issues":94,"watchers":391,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/935"},"html":{"href":"https://github.com/EFForg/privacybadgerchrome/pull/935"},"issue":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/935"},"comments":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/935/comments"},"review_comments":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/935/comments"},"review_comment":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/935/commits"},"statuses":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/statuses/773091e2383f98d9e2601e519af0c3e26e04c99a"}}}}
{"actor":{"display_login":"cooperq"}}