GitHub PullRequestReviewCommentEvent at 2014-08-29 15:00:41
Repository: o-hoverable
Actor: triblondon
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/comments/16902181","id":16902181,"diff_hunk":"@@ -63,23 +67,42 @@ var test = (function(win) {\n \t}\n \n \tfunction listener(type, event, fn) {\n-\t\twin[type+'EventListener'](event, fn, false);\n+\t\tel[type+'EventListener'](event, fn, false);\n \t}\n \n \tfunction classExists() {\n \t\treturn classList.contains(className);\n \t}\n \n-\tif (win.document.documentElement) {\n-\t\tinit();\n-\t} else {\n-\t\tlistener('add', 'DOMContentLoaded', init);\n+\tfunction destroy() {\n+\n \t}\n \n+\tinit();\n+\n \treturn {\n \t\tsetClassName: function(str) {\n \t\t\tclassName = str;\n \t\t},\n+\t\tdestroy: destroy,\n \t\tisHoverEnabled: classExists\n \t}\n-}(window));\n+};\n+\n+Hoverable.init = function(el) {\n+    if (!el) {\n+        el = window; \n+    } else if (!(el instanceof HTMLElement)) {\n+        el = document.querySelector(el);\n+    }\n+    if (!el.hasAttribute('data-o-hoverable--js')) {\n+    \treturn new Hoverable(el);\n+    }\n+};\n+\n+var constructAll = function() {","path":"main.js","position":71,"original_position":71,"commit_id":"9c1e0ac2b3ae00c97d9fa7fb4968322cb190ba9b","original_commit_id":"9c1e0ac2b3ae00c97d9fa7fb4968322cb190ba9b","user":{"login":"triblondon","id":1735391,"avatar_url":"https://avatars.githubusercontent.com/u/1735391?v=2","gravatar_id":"fd1af6cc88403788ae1e5710871bbf62","url":"https://api.github.com/users/triblondon","html_url":"https://github.com/triblondon","followers_url":"https://api.github.com/users/triblondon/followers","following_url":"https://api.github.com/users/triblondon/following{/other_user}","gists_url":"https://api.github.com/users/triblondon/gists{/gist_id}","starred_url":"https://api.github.com/users/triblondon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triblondon/subscriptions","organizations_url":"https://api.github.com/users/triblondon/orgs","repos_url":"https://api.github.com/users/triblondon/repos","events_url":"https://api.github.com/users/triblondon/events{/privacy}","received_events_url":"https://api.github.com/users/triblondon/received_events","type":"User","site_admin":false},"body":"Ah, you've made it possible to instantiate more than one.  That seems a bit unwise.  I can't see any use case for this module outside of operating on the body element.","created_at":"2014-08-29T15:00:41Z","updated_at":"2014-08-29T15:00:41Z","html_url":"https://github.com/Financial-Times/o-hoverable/pull/3#discussion_r16902181","pull_request_url":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/comments/16902181"},"html":{"href":"https://github.com/Financial-Times/o-hoverable/pull/3#discussion_r16902181"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/3","id":20451244,"html_url":"https://github.com/Financial-Times/o-hoverable/pull/3","diff_url":"https://github.com/Financial-Times/o-hoverable/pull/3.diff","patch_url":"https://github.com/Financial-Times/o-hoverable/pull/3.patch","issue_url":"https://api.github.com/repos/Financial-Times/o-hoverable/issues/3","number":3,"state":"open","locked":false,"title":"Init and demos","user":{"login":"AlbertoElias","id":913117,"avatar_url":"https://avatars.githubusercontent.com/u/913117?v=2","gravatar_id":"471b553cbdf424070586820c0b663000","url":"https://api.github.com/users/AlbertoElias","html_url":"https://github.com/AlbertoElias","followers_url":"https://api.github.com/users/AlbertoElias/followers","following_url":"https://api.github.com/users/AlbertoElias/following{/other_user}","gists_url":"https://api.github.com/users/AlbertoElias/gists{/gist_id}","starred_url":"https://api.github.com/users/AlbertoElias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlbertoElias/subscriptions","organizations_url":"https://api.github.com/users/AlbertoElias/orgs","repos_url":"https://api.github.com/users/AlbertoElias/repos","events_url":"https://api.github.com/users/AlbertoElias/events{/privacy}","received_events_url":"https://api.github.com/users/AlbertoElias/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-08-28T16:41:24Z","updated_at":"2014-08-29T15:00:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"531338f178bc492385363593f19cbe2e69274f02","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Financial-Times/o-hoverable/issues/3/comments","statuses_url":"https://api.github.com/repos/Financial-Times/o-hoverable/statuses/9c1e0ac2b3ae00c97d9fa7fb4968322cb190ba9b","head":{"label":"Financial-Times:init","ref":"init","sha":"9c1e0ac2b3ae00c97d9fa7fb4968322cb190ba9b","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=2","gravatar_id":"7fb6de4b2ba1b6d9806d7325369e6bcb","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":15800665,"name":"o-hoverable","full_name":"Financial-Times/o-hoverable","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=2","gravatar_id":"7fb6de4b2ba1b6d9806d7325369e6bcb","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/o-hoverable","description":"Utility to allow selective enabling/disabling of hover effects","fork":false,"url":"https://api.github.com/repos/Financial-Times/o-hoverable","forks_url":"https://api.github.com/repos/Financial-Times/o-hoverable/forks","keys_url":"https://api.github.com/repos/Financial-Times/o-hoverable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/o-hoverable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/o-hoverable/teams","hooks_url":"https://api.github.com/repos/Financial-Times/o-hoverable/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/o-hoverable/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/o-hoverable/events","assignees_url":"https://api.github.com/repos/Financial-Times/o-hoverable/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/o-hoverable/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/o-hoverable/tags","blobs_url":"https://api.github.com/repos/Financial-Times/o-hoverable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/o-hoverable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/o-hoverable/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/o-hoverable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/o-hoverable/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/o-hoverable/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/o-hoverable/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/o-hoverable/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/o-hoverable/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/o-hoverable/subscription","commits_url":"https://api.github.com/repos/Financial-Times/o-hoverable/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/o-hoverable/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/o-hoverable/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/o-hoverable/issues/comments/{number}","contents_url":"https://api.github.com/repos/Financial-Times/o-hoverable/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/o-hoverable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/o-hoverable/merges","archive_url":"https://api.github.com/repos/Financial-Times/o-hoverable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/o-hoverable/downloads","issues_url":"https://api.github.com/repos/Financial-Times/o-hoverable/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/o-hoverable/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/o-hoverable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/o-hoverable/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/o-hoverable/releases{/id}","created_at":"2014-01-10T14:54:19Z","updated_at":"2014-07-01T18:22:45Z","pushed_at":"2014-08-29T09:44:54Z","git_url":"git://github.com/Financial-Times/o-hoverable.git","ssh_url":"git@github.com:Financial-Times/o-hoverable.git","clone_url":"https://github.com/Financial-Times/o-hoverable.git","svn_url":"https://github.com/Financial-Times/o-hoverable","homepage":"http://registry.origami.ft.com/components/o-hoverable","size":280,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"3aa928efae338f33091b9b86769e01063c3b0484","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=2","gravatar_id":"7fb6de4b2ba1b6d9806d7325369e6bcb","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":15800665,"name":"o-hoverable","full_name":"Financial-Times/o-hoverable","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=2","gravatar_id":"7fb6de4b2ba1b6d9806d7325369e6bcb","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/o-hoverable","description":"Utility to allow selective enabling/disabling of hover effects","fork":false,"url":"https://api.github.com/repos/Financial-Times/o-hoverable","forks_url":"https://api.github.com/repos/Financial-Times/o-hoverable/forks","keys_url":"https://api.github.com/repos/Financial-Times/o-hoverable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/o-hoverable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/o-hoverable/teams","hooks_url":"https://api.github.com/repos/Financial-Times/o-hoverable/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/o-hoverable/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/o-hoverable/events","assignees_url":"https://api.github.com/repos/Financial-Times/o-hoverable/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/o-hoverable/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/o-hoverable/tags","blobs_url":"https://api.github.com/repos/Financial-Times/o-hoverable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/o-hoverable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/o-hoverable/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/o-hoverable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/o-hoverable/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/o-hoverable/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/o-hoverable/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/o-hoverable/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/o-hoverable/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/o-hoverable/subscription","commits_url":"https://api.github.com/repos/Financial-Times/o-hoverable/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/o-hoverable/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/o-hoverable/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/o-hoverable/issues/comments/{number}","contents_url":"https://api.github.com/repos/Financial-Times/o-hoverable/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/o-hoverable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/o-hoverable/merges","archive_url":"https://api.github.com/repos/Financial-Times/o-hoverable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/o-hoverable/downloads","issues_url":"https://api.github.com/repos/Financial-Times/o-hoverable/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/o-hoverable/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/o-hoverable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/o-hoverable/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/o-hoverable/releases{/id}","created_at":"2014-01-10T14:54:19Z","updated_at":"2014-07-01T18:22:45Z","pushed_at":"2014-08-29T09:44:54Z","git_url":"git://github.com/Financial-Times/o-hoverable.git","ssh_url":"git@github.com:Financial-Times/o-hoverable.git","clone_url":"https://github.com/Financial-Times/o-hoverable.git","svn_url":"https://github.com/Financial-Times/o-hoverable","homepage":"http://registry.origami.ft.com/components/o-hoverable","size":280,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/3"},"html":{"href":"https://github.com/Financial-Times/o-hoverable/pull/3"},"issue":{"href":"https://api.github.com/repos/Financial-Times/o-hoverable/issues/3"},"comments":{"href":"https://api.github.com/repos/Financial-Times/o-hoverable/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/o-hoverable/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/o-hoverable/statuses/9c1e0ac2b3ae00c97d9fa7fb4968322cb190ba9b"}}}}