{"action":"created","comment":{"url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/comments/87056422","pull_request_review_id":7683750,"id":87056422,"diff_hunk":"@@ -84,7 +84,7 @@ function importTrackerList() {\n     var reader = new FileReader();\n     reader.readAsText(file);\n     reader.onload = function(e) {\n-      parseTrackerList(e.target.result);\n+      parseUserDataFile(e.target.result);\n     };\n   } else {\n     confirm(\"Please select a file to import.\");","path":"src/options.js","position":null,"original_position":17,"commit_id":"c2d080f35a0ac2e36354b227567a7ecd7bd3b870","original_commit_id":"c2d080f35a0ac2e36354b227567a7ecd7bd3b870","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":"i18n\r\n","created_at":"2016-11-08T18:48:48Z","updated_at":"2016-11-08T18:50:52Z","html_url":"https://github.com/EFForg/privacybadgerchrome/pull/982#discussion_r87056422","pull_request_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/982","_links":{"self":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/comments/87056422"},"html":{"href":"https://github.com/EFForg/privacybadgerchrome/pull/982#discussion_r87056422"},"pull_request":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/982"}}},"pull_request":{"url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/982","id":91558302,"html_url":"https://github.com/EFForg/privacybadgerchrome/pull/982","diff_url":"https://github.com/EFForg/privacybadgerchrome/pull/982.diff","patch_url":"https://github.com/EFForg/privacybadgerchrome/pull/982.patch","issue_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/982","number":982,"state":"open","locked":false,"title":"Adding ability to import and export tracker list","user":{"login":"alexristich","id":11308076,"avatar_url":"https://avatars.githubusercontent.com/u/11308076?v=3","gravatar_id":"","url":"https://api.github.com/users/alexristich","html_url":"https://github.com/alexristich","followers_url":"https://api.github.com/users/alexristich/followers","following_url":"https://api.github.com/users/alexristich/following{/other_user}","gists_url":"https://api.github.com/users/alexristich/gists{/gist_id}","starred_url":"https://api.github.com/users/alexristich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexristich/subscriptions","organizations_url":"https://api.github.com/users/alexristich/orgs","repos_url":"https://api.github.com/users/alexristich/repos","events_url":"https://api.github.com/users/alexristich/events{/privacy}","received_events_url":"https://api.github.com/users/alexristich/received_events","type":"User","site_admin":false},"body":"@cooperq @ghostwords \r\n\r\nThis pull request implements the features requested in #121.\r\n\r\nThe current implementation only covers `action_map` and `snitch_map`, as `settings_map` currently only has two items, and it seemed a bit strange to me to be exporting `settings_map` data along with tracker data since \"Settings\" has its own tab on the Options page.\r\n\r\nEXPORT:\r\nAllows a user to download the data from `action_map` and `snitch_map` in JSON format, not as a binary object.\r\n\r\nIMPORT:\r\nAllows a user to import data from a file that is (a) in JSON format and (b) has the same structure as the file that Privacy Badger exports. Import acts as a semi-union: if a given domain *does not* exist in the current map, it will be added; if a given domain *does* exist, it will be overwritten with the object from the supplied file.\r\n\r\n\r\nDo we need to do anything on `action_map` with regard to `nextUpdateTime` once we finish importing, especially as an imported file can contain old data?\r\n\r\nThe current code does work according to my manual tests, though I think it's wise to discuss the current implementation before determining that the existing behavior is the desired behavior. Once that's done I'll write up some tests that can be run as part of the test suite.","created_at":"2016-10-31T05:24:25Z","updated_at":"2016-11-08T18:50:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c08524bc60f977e474727fa8acaf7ea14ecced48","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/982/commits","review_comments_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/982/comments","review_comment_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/982/comments","statuses_url":"https://api.github.com/repos/EFForg/privacybadgerchrome/statuses/c2d080f35a0ac2e36354b227567a7ecd7bd3b870","head":{"label":"EFForg:download","ref":"download","sha":"c2d080f35a0ac2e36354b227567a7ecd7bd3b870","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-11-06T12:58:58Z","pushed_at":"2016-11-04T10:17:44Z","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":18865,"stargazers_count":409,"watchers_count":409,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":92,"mirror_url":null,"open_issues_count":101,"forks":92,"open_issues":101,"watchers":409,"default_branch":"master"}},"base":{"label":"EFForg:master","ref":"master","sha":"5d7c79ba4bea48bb2d0b240d481e6c9ea4cc359d","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-11-06T12:58:58Z","pushed_at":"2016-11-04T10:17:44Z","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":18865,"stargazers_count":409,"watchers_count":409,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":92,"mirror_url":null,"open_issues_count":101,"forks":92,"open_issues":101,"watchers":409,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/982"},"html":{"href":"https://github.com/EFForg/privacybadgerchrome/pull/982"},"issue":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/982"},"comments":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/issues/982/comments"},"review_comments":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/982/comments"},"review_comment":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/pulls/982/commits"},"statuses":{"href":"https://api.github.com/repos/EFForg/privacybadgerchrome/statuses/c2d080f35a0ac2e36354b227567a7ecd7bd3b870"}}}}
{"actor":{"display_login":"cooperq"}}