{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/frontend/pulls/comments/55840441","id":55840441,"diff_hunk":"@@ -0,0 +1,38 @@\n+define([\n+    'bean',\n+    'common/utils/$',\n+    'common/utils/fastdom-promise'\n+], function (\n+    bean,\n+    $,\n+    fastdom\n+) {\n+    return {\n+        handleCompletion: function () {\n+            if (HTMLFormElement.prototype.checkValidity) {\n+                var $quiz = $('.js-atom-quiz--instant-reveal');\n+                if ($quiz.length > 0) {\n+                    bean.on(document, 'click', Array.prototype.slice.call($quiz), function (e) {","path":"static/src/javascripts/projects/common/modules/atoms/quiz.js","position":15,"original_position":15,"commit_id":"d15c413976e3cabb1d52d8a27d22119e08776735","original_commit_id":"d15c413976e3cabb1d52d8a27d22119e08776735","user":{"login":"OliverJAsh","id":921609,"avatar_url":"https://avatars.githubusercontent.com/u/921609?v=3","gravatar_id":"","url":"https://api.github.com/users/OliverJAsh","html_url":"https://github.com/OliverJAsh","followers_url":"https://api.github.com/users/OliverJAsh/followers","following_url":"https://api.github.com/users/OliverJAsh/following{/other_user}","gists_url":"https://api.github.com/users/OliverJAsh/gists{/gist_id}","starred_url":"https://api.github.com/users/OliverJAsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OliverJAsh/subscriptions","organizations_url":"https://api.github.com/users/OliverJAsh/orgs","repos_url":"https://api.github.com/users/OliverJAsh/repos","events_url":"https://api.github.com/users/OliverJAsh/events{/privacy}","received_events_url":"https://api.github.com/users/OliverJAsh/received_events","type":"User","site_admin":false},"body":"You could import `toArray` from Lodash for readability.","created_at":"2016-03-11T15:07:24Z","updated_at":"2016-03-11T15:07:24Z","html_url":"https://github.com/guardian/frontend/pull/12236#discussion_r55840441","pull_request_url":"https://api.github.com/repos/guardian/frontend/pulls/12236","_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments/55840441"},"html":{"href":"https://github.com/guardian/frontend/pull/12236#discussion_r55840441"},"pull_request":{"href":"https://api.github.com/repos/guardian/frontend/pulls/12236"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/12236","id":62418436,"html_url":"https://github.com/guardian/frontend/pull/12236","diff_url":"https://github.com/guardian/frontend/pull/12236.diff","patch_url":"https://github.com/guardian/frontend/pull/12236.patch","issue_url":"https://api.github.com/repos/guardian/frontend/issues/12236","number":12236,"state":"open","locked":false,"title":"Instant reveal knowledge quizzes, and styling fixes","user":{"login":"sndrs","id":867233,"avatar_url":"https://avatars.githubusercontent.com/u/867233?v=3","gravatar_id":"","url":"https://api.github.com/users/sndrs","html_url":"https://github.com/sndrs","followers_url":"https://api.github.com/users/sndrs/followers","following_url":"https://api.github.com/users/sndrs/following{/other_user}","gists_url":"https://api.github.com/users/sndrs/gists{/gist_id}","starred_url":"https://api.github.com/users/sndrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sndrs/subscriptions","organizations_url":"https://api.github.com/users/sndrs/orgs","repos_url":"https://api.github.com/users/sndrs/repos","events_url":"https://api.github.com/users/sndrs/events{/privacy}","received_events_url":"https://api.github.com/users/sndrs/received_events","type":"User","site_admin":false},"body":"## What does this change?\r\n\r\n- where possible, we reveal the truth about your answer as you select it, by styling form state. A tiny bit of JS was needed to select which message to show at the end.\r\n- moves the quiz CSS to the head of articles\r\n- updates the image styling \r\n\r\n## Screenshots\r\n\r\n![screen shot 2016-03-10 at 16 43 59](https://cloud.githubusercontent.com/assets/867233/13676845/5ac18dda-e6df-11e5-8ec1-829e1ecd14b5.png)\r\n\r\n![screen shot 2016-03-10 at 16 44 40](https://cloud.githubusercontent.com/assets/867233/13676863/6bbffad6-e6df-11e5-856c-c24bec9d19f8.png)\r\n\r\n\r\n![screen shot 2016-03-10 at 15 54 58](https://cloud.githubusercontent.com/assets/867233/13676595/6695c9b0-e6de-11e5-871a-3b7a5b5b1fc8.png)\r\n\r\n![screen shot 2016-03-10 at 15 55 13](https://cloud.githubusercontent.com/assets/867233/13676617/7cd0eb92-e6de-11e5-8bc8-e621219b2312.png)\r\n\r\n![screen shot 2016-03-10 at 16 37 52](https://cloud.githubusercontent.com/assets/867233/13676622/80702204-e6de-11e5-99b4-c9d5059d997a.png)\r\n\r\n## Request for comment\r\n\r\n@Pearson82 @rich-nguyen ","created_at":"2016-03-10T16:41:20Z","updated_at":"2016-03-11T15:07:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5382167b43ee2de692a7512ea36d18d1f8f6ee57","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/frontend/pulls/12236/commits","review_comments_url":"https://api.github.com/repos/guardian/frontend/pulls/12236/comments","review_comment_url":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/12236/comments","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/d15c413976e3cabb1d52d8a27d22119e08776735","head":{"label":"guardian:instant-reveal-quiz","ref":"instant-reveal-quiz","sha":"d15c413976e3cabb1d52d8a27d22119e08776735","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/frontend/deployments","created_at":"2012-05-18T15:39:15Z","updated_at":"2016-03-10T22:23:16Z","pushed_at":"2016-03-11T15:03:48Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":456743,"stargazers_count":3122,"watchers_count":3122,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":320,"mirror_url":null,"open_issues_count":63,"forks":320,"open_issues":63,"watchers":3122,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"4f428f210eacb0a714142d200c7b8bccd67e80e1","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/frontend/deployments","created_at":"2012-05-18T15:39:15Z","updated_at":"2016-03-10T22:23:16Z","pushed_at":"2016-03-11T15:03:48Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":456743,"stargazers_count":3122,"watchers_count":3122,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":320,"mirror_url":null,"open_issues_count":63,"forks":320,"open_issues":63,"watchers":3122,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/12236"},"html":{"href":"https://github.com/guardian/frontend/pull/12236"},"issue":{"href":"https://api.github.com/repos/guardian/frontend/issues/12236"},"comments":{"href":"https://api.github.com/repos/guardian/frontend/issues/12236/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/frontend/pulls/12236/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/frontend/pulls/12236/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/frontend/statuses/d15c413976e3cabb1d52d8a27d22119e08776735"}}}}