{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/comments/85305748","pull_request_review_id":6027978,"id":85305748,"diff_hunk":"@@ -847,10 +906,33 @@ function Schedule(CUSTOM_CONFIG) {\n     window.scrollTo(0, 0);\n   }\n \n+  //Manages state of timeblocks and stores that in localStorage\n   schedule.toggleTimeblock = function(timeblockContainer) {\n-    timeblockContainer.find(\".timeblock-header\")\n+    timeblockContainer.toggleClass('expanded')\n+                      .find(\".timeblock-header\")\n                       .find('.fa').toggleClass('fa-chevron-circle-left fa-chevron-circle-down');\n-    schedule.animateBlockToggle(timeblockContainer.find(\".sessions-container\"));\n+    timeblockContainer.find('.sessions-container').slideToggle();\n+\n+    var timeblockIsOpen = timeblockContainer.hasClass('expanded');\n+    var openTimeblocks = JSON.parse(localStorage.getItem('timeblock-states')) || [] ;\n+    var timeblockID = timeblockContainer['0'].id;\n+    var index = openTimeblocks.indexOf(timeblockID);\n+    if(timeblockIsOpen && index === -1){\n+      openTimeblocks.push(timeblockID);\n+    } else if (!timeblockIsOpen && index > -1) {\n+        openTimeblocks.splice(index, 1);\n+    }\n+    if(Modernizr.localstorage){\n+      localStorage['timeblock-states'] = JSON.stringify(openTimeblocks);\n+    }\n+  }\n+\n+  schedule.shouldTimeblockBeOpen = function(timeblockContainerId) {\n+    var openTimeblocks = JSON.parse(localStorage.getItem('timeblock-states')) || [schedule.timeblocks[0].key] ;","path":"js/schedule.js","position":354,"original_position":354,"commit_id":"7059aaa21ecbbde33e6abe982c7dc61a60f60931","original_commit_id":"7059aaa21ecbbde33e6abe982c7dc61a60f60931","user":{"login":"mmmavis","id":2896608,"avatar_url":"https://avatars.githubusercontent.com/u/2896608?v=3","gravatar_id":"","url":"https://api.github.com/users/mmmavis","html_url":"https://github.com/mmmavis","followers_url":"https://api.github.com/users/mmmavis/followers","following_url":"https://api.github.com/users/mmmavis/following{/other_user}","gists_url":"https://api.github.com/users/mmmavis/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmavis/subscriptions","organizations_url":"https://api.github.com/users/mmmavis/orgs","repos_url":"https://api.github.com/users/mmmavis/repos","events_url":"https://api.github.com/users/mmmavis/events{/privacy}","received_events_url":"https://api.github.com/users/mmmavis/received_events","type":"User","site_admin":false},"body":"check for `localStorage` here too? 👍 ","created_at":"2016-10-27T10:06:08Z","updated_at":"2016-10-27T10:06:08Z","html_url":"https://github.com/mozilla/mozfest-event-app/pull/469#discussion_r85305748","pull_request_url":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/469","_links":{"self":{"href":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/comments/85305748"},"html":{"href":"https://github.com/mozilla/mozfest-event-app/pull/469#discussion_r85305748"},"pull_request":{"href":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/469"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/469","id":90454351,"html_url":"https://github.com/mozilla/mozfest-event-app/pull/469","diff_url":"https://github.com/mozilla/mozfest-event-app/pull/469.diff","patch_url":"https://github.com/mozilla/mozfest-event-app/pull/469.patch","issue_url":"https://api.github.com/repos/mozilla/mozfest-event-app/issues/469","number":469,"state":"open","locked":false,"title":"Preserve toggle and scroll states","user":{"login":"alanmoo","id":1682681,"avatar_url":"https://avatars.githubusercontent.com/u/1682681?v=3","gravatar_id":"","url":"https://api.github.com/users/alanmoo","html_url":"https://github.com/alanmoo","followers_url":"https://api.github.com/users/alanmoo/followers","following_url":"https://api.github.com/users/alanmoo/following{/other_user}","gists_url":"https://api.github.com/users/alanmoo/gists{/gist_id}","starred_url":"https://api.github.com/users/alanmoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanmoo/subscriptions","organizations_url":"https://api.github.com/users/alanmoo/orgs","repos_url":"https://api.github.com/users/alanmoo/repos","events_url":"https://api.github.com/users/alanmoo/events{/privacy}","received_events_url":"https://api.github.com/users/alanmoo/received_events","type":"User","site_admin":false},"body":"Closes #251 ","created_at":"2016-10-21T22:32:26Z","updated_at":"2016-10-27T10:10:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62b6bbcea129902cb86d3f4eb6db8f3f57b329b7","assignee":{"login":"mmmavis","id":2896608,"avatar_url":"https://avatars.githubusercontent.com/u/2896608?v=3","gravatar_id":"","url":"https://api.github.com/users/mmmavis","html_url":"https://github.com/mmmavis","followers_url":"https://api.github.com/users/mmmavis/followers","following_url":"https://api.github.com/users/mmmavis/following{/other_user}","gists_url":"https://api.github.com/users/mmmavis/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmavis/subscriptions","organizations_url":"https://api.github.com/users/mmmavis/orgs","repos_url":"https://api.github.com/users/mmmavis/repos","events_url":"https://api.github.com/users/mmmavis/events{/privacy}","received_events_url":"https://api.github.com/users/mmmavis/received_events","type":"User","site_admin":false},"assignees":[{"login":"mmmavis","id":2896608,"avatar_url":"https://avatars.githubusercontent.com/u/2896608?v=3","gravatar_id":"","url":"https://api.github.com/users/mmmavis","html_url":"https://github.com/mmmavis","followers_url":"https://api.github.com/users/mmmavis/followers","following_url":"https://api.github.com/users/mmmavis/following{/other_user}","gists_url":"https://api.github.com/users/mmmavis/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmavis/subscriptions","organizations_url":"https://api.github.com/users/mmmavis/orgs","repos_url":"https://api.github.com/users/mmmavis/repos","events_url":"https://api.github.com/users/mmmavis/events{/privacy}","received_events_url":"https://api.github.com/users/mmmavis/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/469/commits","review_comments_url":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/469/comments","review_comment_url":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/mozfest-event-app/issues/469/comments","statuses_url":"https://api.github.com/repos/mozilla/mozfest-event-app/statuses/7059aaa21ecbbde33e6abe982c7dc61a60f60931","head":{"label":"mozilla:preserve-toggle-state","ref":"preserve-toggle-state","sha":"7059aaa21ecbbde33e6abe982c7dc61a60f60931","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":42895469,"name":"mozfest-event-app","full_name":"mozilla/mozfest-event-app","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/mozfest-event-app","description":"MozFest 2016 Event App","fork":false,"url":"https://api.github.com/repos/mozilla/mozfest-event-app","forks_url":"https://api.github.com/repos/mozilla/mozfest-event-app/forks","keys_url":"https://api.github.com/repos/mozilla/mozfest-event-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/mozfest-event-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/mozfest-event-app/teams","hooks_url":"https://api.github.com/repos/mozilla/mozfest-event-app/hooks","issue_events_url":"https://api.github.com/repos/mozilla/mozfest-event-app/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/mozfest-event-app/events","assignees_url":"https://api.github.com/repos/mozilla/mozfest-event-app/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/mozfest-event-app/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/mozfest-event-app/tags","blobs_url":"https://api.github.com/repos/mozilla/mozfest-event-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/mozfest-event-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/mozfest-event-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/mozfest-event-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/mozfest-event-app/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/mozfest-event-app/languages","stargazers_url":"https://api.github.com/repos/mozilla/mozfest-event-app/stargazers","contributors_url":"https://api.github.com/repos/mozilla/mozfest-event-app/contributors","subscribers_url":"https://api.github.com/repos/mozilla/mozfest-event-app/subscribers","subscription_url":"https://api.github.com/repos/mozilla/mozfest-event-app/subscription","commits_url":"https://api.github.com/repos/mozilla/mozfest-event-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/mozfest-event-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/mozfest-event-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/mozfest-event-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/mozfest-event-app/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/mozfest-event-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/mozfest-event-app/merges","archive_url":"https://api.github.com/repos/mozilla/mozfest-event-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/mozfest-event-app/downloads","issues_url":"https://api.github.com/repos/mozilla/mozfest-event-app/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/mozfest-event-app/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/mozfest-event-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/mozfest-event-app/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/mozfest-event-app/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/mozfest-event-app/deployments","created_at":"2015-09-21T21:47:34Z","updated_at":"2016-10-24T05:12:15Z","pushed_at":"2016-10-27T09:53:33Z","git_url":"git://github.com/mozilla/mozfest-event-app.git","ssh_url":"git@github.com:mozilla/mozfest-event-app.git","clone_url":"https://github.com/mozilla/mozfest-event-app.git","svn_url":"https://github.com/mozilla/mozfest-event-app","homepage":"https://app.mozillafestival.org/","size":5781,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":23,"forks":17,"open_issues":23,"watchers":4,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"711e18df5dacca85fd1c95d3cfcaf82630fc63b6","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":42895469,"name":"mozfest-event-app","full_name":"mozilla/mozfest-event-app","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/mozfest-event-app","description":"MozFest 2016 Event App","fork":false,"url":"https://api.github.com/repos/mozilla/mozfest-event-app","forks_url":"https://api.github.com/repos/mozilla/mozfest-event-app/forks","keys_url":"https://api.github.com/repos/mozilla/mozfest-event-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/mozfest-event-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/mozfest-event-app/teams","hooks_url":"https://api.github.com/repos/mozilla/mozfest-event-app/hooks","issue_events_url":"https://api.github.com/repos/mozilla/mozfest-event-app/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/mozfest-event-app/events","assignees_url":"https://api.github.com/repos/mozilla/mozfest-event-app/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/mozfest-event-app/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/mozfest-event-app/tags","blobs_url":"https://api.github.com/repos/mozilla/mozfest-event-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/mozfest-event-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/mozfest-event-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/mozfest-event-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/mozfest-event-app/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/mozfest-event-app/languages","stargazers_url":"https://api.github.com/repos/mozilla/mozfest-event-app/stargazers","contributors_url":"https://api.github.com/repos/mozilla/mozfest-event-app/contributors","subscribers_url":"https://api.github.com/repos/mozilla/mozfest-event-app/subscribers","subscription_url":"https://api.github.com/repos/mozilla/mozfest-event-app/subscription","commits_url":"https://api.github.com/repos/mozilla/mozfest-event-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/mozfest-event-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/mozfest-event-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/mozfest-event-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/mozfest-event-app/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/mozfest-event-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/mozfest-event-app/merges","archive_url":"https://api.github.com/repos/mozilla/mozfest-event-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/mozfest-event-app/downloads","issues_url":"https://api.github.com/repos/mozilla/mozfest-event-app/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/mozfest-event-app/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/mozfest-event-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/mozfest-event-app/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/mozfest-event-app/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/mozfest-event-app/deployments","created_at":"2015-09-21T21:47:34Z","updated_at":"2016-10-24T05:12:15Z","pushed_at":"2016-10-27T09:53:33Z","git_url":"git://github.com/mozilla/mozfest-event-app.git","ssh_url":"git@github.com:mozilla/mozfest-event-app.git","clone_url":"https://github.com/mozilla/mozfest-event-app.git","svn_url":"https://github.com/mozilla/mozfest-event-app","homepage":"https://app.mozillafestival.org/","size":5781,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":23,"forks":17,"open_issues":23,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/469"},"html":{"href":"https://github.com/mozilla/mozfest-event-app/pull/469"},"issue":{"href":"https://api.github.com/repos/mozilla/mozfest-event-app/issues/469"},"comments":{"href":"https://api.github.com/repos/mozilla/mozfest-event-app/issues/469/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/469/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/mozfest-event-app/pulls/469/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/mozfest-event-app/statuses/7059aaa21ecbbde33e6abe982c7dc61a60f60931"}}}}
{"actor":{"display_login":"mmmavis"}}