{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/comments/28505573","id":28505573,"diff_hunk":"@@ -10,14 +11,27 @@ module.exports = function(els) {\n \t\t\tfetch('/embedded-components/slideshow/' + uuid)\n \t\t\t\t.then(fetchres.text)\n \t\t\t\t.then(function(data) {\n-\t\t\t\t\tvar container = document.createElement(\"div\");\n+\t\t\t\t\tvar container = document.createElement('div');\n \t\t\t\t\tcontainer.setAttribute('class', \"article__gallery\");\n \t\t\t\t\tcontainer.innerHTML = data;\n \t\t\t\t\tel.parentNode.replaceChild(container, el);\n \t\t\t\t\treturn container;\n \t\t\t\t})\n \t\t\t\t.then(function(el) {\n+\t\t\t\t\tvar totalItems;\n \t\t\t\t\tel.style.width = el.clientWidth + 'px';\n+\t\t\t\t\tel.addEventListener('oGallery.itemSelect', function (ev) {\n+\t\t\t\t\t\tif (ev.target.classList.contains('o-gallery--slideshow')) {\n+\t\t\t\t\t\t\tAnalytics.fire('galleries', { item: ev.detail.itemID, totalItems: totalItems, interacted: true });\n+\t\t\t\t\t\t}\n+\t\t\t\t\t});\n+\t\t\t\t\tel.addEventListener('oGallery.ready', function oGalleryIsReady(ev) {\n+\t\t\t\t\t\tif (ev.target.classList.contains('o-gallery--slideshow')) {\n+\t\t\t\t\t\t\tel.removeEventListener(ev.type, oGalleryIsReady);\n+\t\t\t\t\t\t\ttotalItems = ev.target.querySelectorAll('.o-gallery__item').length;\n+\t\t\t\t\t\t\tAnalytics.fire('galleries', { item: 0, totalItems: totalItems, interacted: false });","path":"client/components/slideshow/main.js","position":31,"original_position":31,"commit_id":"204bf9aa0ee805b417ab810d3d7c33cb164d4813","original_commit_id":"204bf9aa0ee805b417ab810d3d7c33cb164d4813","user":{"login":"commuterjoy","id":84996,"avatar_url":"https://avatars.githubusercontent.com/u/84996?v=3","gravatar_id":"","url":"https://api.github.com/users/commuterjoy","html_url":"https://github.com/commuterjoy","followers_url":"https://api.github.com/users/commuterjoy/followers","following_url":"https://api.github.com/users/commuterjoy/following{/other_user}","gists_url":"https://api.github.com/users/commuterjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/commuterjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commuterjoy/subscriptions","organizations_url":"https://api.github.com/users/commuterjoy/orgs","repos_url":"https://api.github.com/users/commuterjoy/repos","events_url":"https://api.github.com/users/commuterjoy/events{/privacy}","received_events_url":"https://api.github.com/users/commuterjoy/received_events","type":"User","site_admin":false},"body":"what's the idea with this?","created_at":"2015-04-16T12:42:38Z","updated_at":"2015-04-16T12:42:38Z","html_url":"https://github.com/Financial-Times/next-grumman/pull/390#discussion_r28505573","pull_request_url":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/390","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/comments/28505573"},"html":{"href":"https://github.com/Financial-Times/next-grumman/pull/390#discussion_r28505573"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/390"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/390","id":33440773,"html_url":"https://github.com/Financial-Times/next-grumman/pull/390","diff_url":"https://github.com/Financial-Times/next-grumman/pull/390.diff","patch_url":"https://github.com/Financial-Times/next-grumman/pull/390.patch","issue_url":"https://api.github.com/repos/Financial-Times/next-grumman/issues/390","number":390,"state":"closed","locked":false,"title":"Beacon interactions with gallery","user":{"login":"ironsidevsquincy","id":74132,"avatar_url":"https://avatars.githubusercontent.com/u/74132?v=3","gravatar_id":"","url":"https://api.github.com/users/ironsidevsquincy","html_url":"https://github.com/ironsidevsquincy","followers_url":"https://api.github.com/users/ironsidevsquincy/followers","following_url":"https://api.github.com/users/ironsidevsquincy/following{/other_user}","gists_url":"https://api.github.com/users/ironsidevsquincy/gists{/gist_id}","starred_url":"https://api.github.com/users/ironsidevsquincy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironsidevsquincy/subscriptions","organizations_url":"https://api.github.com/users/ironsidevsquincy/orgs","repos_url":"https://api.github.com/users/ironsidevsquincy/repos","events_url":"https://api.github.com/users/ironsidevsquincy/events{/privacy}","received_events_url":"https://api.github.com/users/ironsidevsquincy/received_events","type":"User","site_admin":false},"body":"Beacon when the gallery loads, and when the user interacts","created_at":"2015-04-16T11:17:59Z","updated_at":"2015-04-16T12:42:38Z","closed_at":"2015-04-16T12:38:50Z","merged_at":"2015-04-16T12:38:50Z","merge_commit_sha":"167266fa3019469920f1349906eb2a3ffc15ba43","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/390/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/390/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/next-grumman/issues/390/comments","statuses_url":"https://api.github.com/repos/Financial-Times/next-grumman/statuses/204bf9aa0ee805b417ab810d3d7c33cb164d4813","head":{"label":"Financial-Times:components-analytics","ref":"components-analytics","sha":"204bf9aa0ee805b417ab810d3d7c33cb164d4813","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":26121818,"name":"next-grumman","full_name":"Financial-Times/next-grumman","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-grumman","description":"For articles","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-grumman","forks_url":"https://api.github.com/repos/Financial-Times/next-grumman/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-grumman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-grumman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-grumman/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-grumman/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-grumman/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-grumman/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-grumman/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-grumman/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-grumman/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-grumman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-grumman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-grumman/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-grumman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-grumman/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-grumman/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-grumman/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-grumman/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-grumman/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-grumman/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-grumman/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-grumman/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-grumman/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-grumman/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-grumman/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-grumman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-grumman/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-grumman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-grumman/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-grumman/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-grumman/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-grumman/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-grumman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-grumman/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-grumman/releases{/id}","created_at":"2014-11-03T14:22:04Z","updated_at":"2015-04-16T12:38:51Z","pushed_at":"2015-04-16T12:38:50Z","git_url":"git://github.com/Financial-Times/next-grumman.git","ssh_url":"git@github.com:Financial-Times/next-grumman.git","clone_url":"https://github.com/Financial-Times/next-grumman.git","svn_url":"https://github.com/Financial-Times/next-grumman","homepage":null,"size":13045,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"840a1e46a5e78263c76bf10b3b827221bc3db712","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":26121818,"name":"next-grumman","full_name":"Financial-Times/next-grumman","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-grumman","description":"For articles","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-grumman","forks_url":"https://api.github.com/repos/Financial-Times/next-grumman/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-grumman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-grumman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-grumman/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-grumman/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-grumman/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-grumman/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-grumman/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-grumman/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-grumman/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-grumman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-grumman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-grumman/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-grumman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-grumman/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-grumman/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-grumman/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-grumman/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-grumman/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-grumman/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-grumman/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-grumman/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-grumman/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-grumman/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-grumman/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-grumman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-grumman/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-grumman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-grumman/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-grumman/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-grumman/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-grumman/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-grumman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-grumman/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-grumman/releases{/id}","created_at":"2014-11-03T14:22:04Z","updated_at":"2015-04-16T12:38:51Z","pushed_at":"2015-04-16T12:38:50Z","git_url":"git://github.com/Financial-Times/next-grumman.git","ssh_url":"git@github.com:Financial-Times/next-grumman.git","clone_url":"https://github.com/Financial-Times/next-grumman.git","svn_url":"https://github.com/Financial-Times/next-grumman","homepage":null,"size":13045,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/390"},"html":{"href":"https://github.com/Financial-Times/next-grumman/pull/390"},"issue":{"href":"https://api.github.com/repos/Financial-Times/next-grumman/issues/390"},"comments":{"href":"https://api.github.com/repos/Financial-Times/next-grumman/issues/390/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/390/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/next-grumman/pulls/390/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/next-grumman/statuses/204bf9aa0ee805b417ab810d3d7c33cb164d4813"}}}}