{"action":"created","issue":{"url":"https://api.github.com/repos/Glavin001/BurntChrome/issues/17","repository_url":"https://api.github.com/repos/Glavin001/BurntChrome","labels_url":"https://api.github.com/repos/Glavin001/BurntChrome/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/Glavin001/BurntChrome/issues/17/comments","events_url":"https://api.github.com/repos/Glavin001/BurntChrome/issues/17/events","html_url":"https://github.com/Glavin001/BurntChrome/issues/17","id":142022151,"number":17,"title":"Read from/Write to file for Whitelist","user":{"login":"Glavin001","id":1885333,"avatar_url":"https://avatars.githubusercontent.com/u/1885333?v=3","gravatar_id":"","url":"https://api.github.com/users/Glavin001","html_url":"https://github.com/Glavin001","followers_url":"https://api.github.com/users/Glavin001/followers","following_url":"https://api.github.com/users/Glavin001/following{/other_user}","gists_url":"https://api.github.com/users/Glavin001/gists{/gist_id}","starred_url":"https://api.github.com/users/Glavin001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glavin001/subscriptions","organizations_url":"https://api.github.com/users/Glavin001/orgs","repos_url":"https://api.github.com/users/Glavin001/repos","events_url":"https://api.github.com/users/Glavin001/events{/privacy}","received_events_url":"https://api.github.com/users/Glavin001/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Glavin001/BurntChrome/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"zhongziyun1993","id":3355559,"avatar_url":"https://avatars.githubusercontent.com/u/3355559?v=3","gravatar_id":"","url":"https://api.github.com/users/zhongziyun1993","html_url":"https://github.com/zhongziyun1993","followers_url":"https://api.github.com/users/zhongziyun1993/followers","following_url":"https://api.github.com/users/zhongziyun1993/following{/other_user}","gists_url":"https://api.github.com/users/zhongziyun1993/gists{/gist_id}","starred_url":"https://api.github.com/users/zhongziyun1993/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhongziyun1993/subscriptions","organizations_url":"https://api.github.com/users/zhongziyun1993/orgs","repos_url":"https://api.github.com/users/zhongziyun1993/repos","events_url":"https://api.github.com/users/zhongziyun1993/events{/privacy}","received_events_url":"https://api.github.com/users/zhongziyun1993/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Glavin001/BurntChrome/milestones/5","html_url":"https://github.com/Glavin001/BurntChrome/milestones/Presentation","labels_url":"https://api.github.com/repos/Glavin001/BurntChrome/milestones/5/labels","id":1640676,"number":5,"title":"Presentation","description":"","creator":{"login":"Glavin001","id":1885333,"avatar_url":"https://avatars.githubusercontent.com/u/1885333?v=3","gravatar_id":"","url":"https://api.github.com/users/Glavin001","html_url":"https://github.com/Glavin001","followers_url":"https://api.github.com/users/Glavin001/followers","following_url":"https://api.github.com/users/Glavin001/following{/other_user}","gists_url":"https://api.github.com/users/Glavin001/gists{/gist_id}","starred_url":"https://api.github.com/users/Glavin001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glavin001/subscriptions","organizations_url":"https://api.github.com/users/Glavin001/orgs","repos_url":"https://api.github.com/users/Glavin001/repos","events_url":"https://api.github.com/users/Glavin001/events{/privacy}","received_events_url":"https://api.github.com/users/Glavin001/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":0,"state":"open","created_at":"2016-03-12T19:42:48Z","updated_at":"2016-03-19T03:18:25Z","due_on":"2016-03-29T03:00:00Z","closed_at":null},"comments":3,"created_at":"2016-03-19T03:14:17Z","updated_at":"2016-03-24T00:10:04Z","closed_at":null,"body":"See https://developer.chrome.com/apps/fileSystem\r\nMaybe `chooseEntry` for obtaining a file to read from and load the Whitelist."},"comment":{"url":"https://api.github.com/repos/Glavin001/BurntChrome/issues/comments/200591090","html_url":"https://github.com/Glavin001/BurntChrome/issues/17#issuecomment-200591090","issue_url":"https://api.github.com/repos/Glavin001/BurntChrome/issues/17","id":200591090,"user":{"login":"Glavin001","id":1885333,"avatar_url":"https://avatars.githubusercontent.com/u/1885333?v=3","gravatar_id":"","url":"https://api.github.com/users/Glavin001","html_url":"https://github.com/Glavin001","followers_url":"https://api.github.com/users/Glavin001/followers","following_url":"https://api.github.com/users/Glavin001/following{/other_user}","gists_url":"https://api.github.com/users/Glavin001/gists{/gist_id}","starred_url":"https://api.github.com/users/Glavin001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glavin001/subscriptions","organizations_url":"https://api.github.com/users/Glavin001/orgs","repos_url":"https://api.github.com/users/Glavin001/repos","events_url":"https://api.github.com/users/Glavin001/events{/privacy}","received_events_url":"https://api.github.com/users/Glavin001/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T00:10:04Z","updated_at":"2016-03-24T00:10:04Z","body":"I think it may be easier if we do not have it show/hide parts, such as clicking \"choose entry\" and showing a new group of elements. I recommend that you keep the view being static, at least for now.\r\n\r\nI recommend you implement the following interface:\r\n\r\nIn `popup.js`:\r\n- [ ] Save to file button\r\n  - [ ] Call `this.background.moderator. getWhitelistJSON()`\r\n  - [ ] Save that JSON to the file\r\n- [ ] Load from file button\r\n  - [ ] Read text from given file\r\n  - [ ] `JSON.parse` the text into a JSON object in-memory\r\n  - [ ] Call `this.background.moderator.setWhitelistJSON(newJSON)`. Note that this method does not already exist, yet.\r\n\r\nIn `background.js`:\r\n- [ ] Add method `setWhitelistJSON` to `Moderator` class\r\n  - See `getWhitelistJSON`: https://github.com/Glavin001/BurntChrome/blob/master/extension/src/background.js#L403-L410\r\n  - Implement something similar that calls `whitelist.set(newJSON)`.\r\n"}}