{"action":"created","comment":{"url":"https://api.github.com/repos/lukekarrys/local-links/pulls/comments/28730923","id":28730923,"diff_hunk":"@@ -44,13 +48,14 @@ function triggerClick(el, modified){\n             window, null,\n             0, 0, 0, 0, /* coordinates */\n             !!modified, false, false, false, /* modifier keys */\n-            0 /*left*/,\n+            button,\n             null\n         );\n         el.dispatchEvent(ev);\n     } else if (document.createEventObject) {\n         ev = document.createEventObject();\n         ev.ctrlKey = !!modified;\n+        ev.button = button;","path":"test/index.js","position":33,"original_position":33,"commit_id":"4c7d99f53d0cee34bf477a6354fcf10cdf289c99","original_commit_id":"4c7d99f53d0cee34bf477a6354fcf10cdf289c99","user":{"login":"chesles","id":149885,"avatar_url":"https://avatars.githubusercontent.com/u/149885?v=3","gravatar_id":"","url":"https://api.github.com/users/chesles","html_url":"https://github.com/chesles","followers_url":"https://api.github.com/users/chesles/followers","following_url":"https://api.github.com/users/chesles/following{/other_user}","gists_url":"https://api.github.com/users/chesles/gists{/gist_id}","starred_url":"https://api.github.com/users/chesles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chesles/subscriptions","organizations_url":"https://api.github.com/users/chesles/orgs","repos_url":"https://api.github.com/users/chesles/repos","events_url":"https://api.github.com/users/chesles/events{/privacy}","received_events_url":"https://api.github.com/users/chesles/received_events","type":"User","site_admin":false},"body":"maybe this doesn't do what I expect it to in IE? I don't have an IE to test in at the moment..","created_at":"2015-04-20T21:24:57Z","updated_at":"2015-04-20T21:24:57Z","html_url":"https://github.com/lukekarrys/local-links/pull/7#discussion_r28730923","pull_request_url":"https://api.github.com/repos/lukekarrys/local-links/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/lukekarrys/local-links/pulls/comments/28730923"},"html":{"href":"https://github.com/lukekarrys/local-links/pull/7#discussion_r28730923"},"pull_request":{"href":"https://api.github.com/repos/lukekarrys/local-links/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/lukekarrys/local-links/pulls/7","id":33698841,"html_url":"https://github.com/lukekarrys/local-links/pull/7","diff_url":"https://github.com/lukekarrys/local-links/pull/7.diff","patch_url":"https://github.com/lukekarrys/local-links/pull/7.patch","issue_url":"https://api.github.com/repos/lukekarrys/local-links/issues/7","number":7,"state":"closed","locked":false,"title":"ignore clicks with non-primary mouse button","user":{"login":"chesles","id":149885,"avatar_url":"https://avatars.githubusercontent.com/u/149885?v=3","gravatar_id":"","url":"https://api.github.com/users/chesles","html_url":"https://github.com/chesles","followers_url":"https://api.github.com/users/chesles/followers","following_url":"https://api.github.com/users/chesles/following{/other_user}","gists_url":"https://api.github.com/users/chesles/gists{/gist_id}","starred_url":"https://api.github.com/users/chesles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chesles/subscriptions","organizations_url":"https://api.github.com/users/chesles/orgs","repos_url":"https://api.github.com/users/chesles/repos","events_url":"https://api.github.com/users/chesles/events{/privacy}","received_events_url":"https://api.github.com/users/chesles/received_events","type":"User","site_admin":false},"body":"First of all thanks for this module, it's great! :) I came here from AmpersandJS/ampersand#86 - I'm using this in a project and find that it's still detecting middle-clicks as \"local\". It looks like local-links [checks for modifier keys](https://github.com/lukekarrys/local-links/blob/master/local-links.js#L36) but doesn't care if the primary mouse button was used or not.\r\n\r\nI can easily check myself:\r\n\r\n```js\r\nvar localPath = localLinks.pathname(e);\r\n        \r\nif (localPath && e.button === 0) {\r\n  ...\r\n}\r\n```\r\n\r\nBut I figured you might want this in local-links itself so everyone can benefit.","created_at":"2015-04-20T19:41:46Z","updated_at":"2015-04-20T21:24:57Z","closed_at":"2015-04-20T20:55:42Z","merged_at":"2015-04-20T20:55:42Z","merge_commit_sha":"3388bab49e58feb6be842ef1a6e4bf2a2c98452b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lukekarrys/local-links/pulls/7/commits","review_comments_url":"https://api.github.com/repos/lukekarrys/local-links/pulls/7/comments","review_comment_url":"https://api.github.com/repos/lukekarrys/local-links/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lukekarrys/local-links/issues/7/comments","statuses_url":"https://api.github.com/repos/lukekarrys/local-links/statuses/4c7d99f53d0cee34bf477a6354fcf10cdf289c99","head":{"label":"chesles:master","ref":"master","sha":"4c7d99f53d0cee34bf477a6354fcf10cdf289c99","user":{"login":"chesles","id":149885,"avatar_url":"https://avatars.githubusercontent.com/u/149885?v=3","gravatar_id":"","url":"https://api.github.com/users/chesles","html_url":"https://github.com/chesles","followers_url":"https://api.github.com/users/chesles/followers","following_url":"https://api.github.com/users/chesles/following{/other_user}","gists_url":"https://api.github.com/users/chesles/gists{/gist_id}","starred_url":"https://api.github.com/users/chesles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chesles/subscriptions","organizations_url":"https://api.github.com/users/chesles/orgs","repos_url":"https://api.github.com/users/chesles/repos","events_url":"https://api.github.com/users/chesles/events{/privacy}","received_events_url":"https://api.github.com/users/chesles/received_events","type":"User","site_admin":false},"repo":{"id":34280559,"name":"local-links","full_name":"chesles/local-links","owner":{"login":"chesles","id":149885,"avatar_url":"https://avatars.githubusercontent.com/u/149885?v=3","gravatar_id":"","url":"https://api.github.com/users/chesles","html_url":"https://github.com/chesles","followers_url":"https://api.github.com/users/chesles/followers","following_url":"https://api.github.com/users/chesles/following{/other_user}","gists_url":"https://api.github.com/users/chesles/gists{/gist_id}","starred_url":"https://api.github.com/users/chesles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chesles/subscriptions","organizations_url":"https://api.github.com/users/chesles/orgs","repos_url":"https://api.github.com/users/chesles/repos","events_url":"https://api.github.com/users/chesles/events{/privacy}","received_events_url":"https://api.github.com/users/chesles/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chesles/local-links","description":"Determine cross-browser if an event or anchor element should be handled locally.","fork":true,"url":"https://api.github.com/repos/chesles/local-links","forks_url":"https://api.github.com/repos/chesles/local-links/forks","keys_url":"https://api.github.com/repos/chesles/local-links/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chesles/local-links/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chesles/local-links/teams","hooks_url":"https://api.github.com/repos/chesles/local-links/hooks","issue_events_url":"https://api.github.com/repos/chesles/local-links/issues/events{/number}","events_url":"https://api.github.com/repos/chesles/local-links/events","assignees_url":"https://api.github.com/repos/chesles/local-links/assignees{/user}","branches_url":"https://api.github.com/repos/chesles/local-links/branches{/branch}","tags_url":"https://api.github.com/repos/chesles/local-links/tags","blobs_url":"https://api.github.com/repos/chesles/local-links/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chesles/local-links/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chesles/local-links/git/refs{/sha}","trees_url":"https://api.github.com/repos/chesles/local-links/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chesles/local-links/statuses/{sha}","languages_url":"https://api.github.com/repos/chesles/local-links/languages","stargazers_url":"https://api.github.com/repos/chesles/local-links/stargazers","contributors_url":"https://api.github.com/repos/chesles/local-links/contributors","subscribers_url":"https://api.github.com/repos/chesles/local-links/subscribers","subscription_url":"https://api.github.com/repos/chesles/local-links/subscription","commits_url":"https://api.github.com/repos/chesles/local-links/commits{/sha}","git_commits_url":"https://api.github.com/repos/chesles/local-links/git/commits{/sha}","comments_url":"https://api.github.com/repos/chesles/local-links/comments{/number}","issue_comment_url":"https://api.github.com/repos/chesles/local-links/issues/comments{/number}","contents_url":"https://api.github.com/repos/chesles/local-links/contents/{+path}","compare_url":"https://api.github.com/repos/chesles/local-links/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chesles/local-links/merges","archive_url":"https://api.github.com/repos/chesles/local-links/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chesles/local-links/downloads","issues_url":"https://api.github.com/repos/chesles/local-links/issues{/number}","pulls_url":"https://api.github.com/repos/chesles/local-links/pulls{/number}","milestones_url":"https://api.github.com/repos/chesles/local-links/milestones{/number}","notifications_url":"https://api.github.com/repos/chesles/local-links/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chesles/local-links/labels{/name}","releases_url":"https://api.github.com/repos/chesles/local-links/releases{/id}","created_at":"2015-04-20T19:06:37Z","updated_at":"2015-04-20T19:37:41Z","pushed_at":"2015-04-20T19:37:41Z","git_url":"git://github.com/chesles/local-links.git","ssh_url":"git@github.com:chesles/local-links.git","clone_url":"https://github.com/chesles/local-links.git","svn_url":"https://github.com/chesles/local-links","homepage":null,"size":109,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lukekarrys:master","ref":"master","sha":"a63a21b00be98f73a52ae0ae9d7aa26f8b172f8a","user":{"login":"lukekarrys","id":542108,"avatar_url":"https://avatars.githubusercontent.com/u/542108?v=3","gravatar_id":"","url":"https://api.github.com/users/lukekarrys","html_url":"https://github.com/lukekarrys","followers_url":"https://api.github.com/users/lukekarrys/followers","following_url":"https://api.github.com/users/lukekarrys/following{/other_user}","gists_url":"https://api.github.com/users/lukekarrys/gists{/gist_id}","starred_url":"https://api.github.com/users/lukekarrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukekarrys/subscriptions","organizations_url":"https://api.github.com/users/lukekarrys/orgs","repos_url":"https://api.github.com/users/lukekarrys/repos","events_url":"https://api.github.com/users/lukekarrys/events{/privacy}","received_events_url":"https://api.github.com/users/lukekarrys/received_events","type":"User","site_admin":false},"repo":{"id":22967045,"name":"local-links","full_name":"lukekarrys/local-links","owner":{"login":"lukekarrys","id":542108,"avatar_url":"https://avatars.githubusercontent.com/u/542108?v=3","gravatar_id":"","url":"https://api.github.com/users/lukekarrys","html_url":"https://github.com/lukekarrys","followers_url":"https://api.github.com/users/lukekarrys/followers","following_url":"https://api.github.com/users/lukekarrys/following{/other_user}","gists_url":"https://api.github.com/users/lukekarrys/gists{/gist_id}","starred_url":"https://api.github.com/users/lukekarrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukekarrys/subscriptions","organizations_url":"https://api.github.com/users/lukekarrys/orgs","repos_url":"https://api.github.com/users/lukekarrys/repos","events_url":"https://api.github.com/users/lukekarrys/events{/privacy}","received_events_url":"https://api.github.com/users/lukekarrys/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lukekarrys/local-links","description":"Determine cross-browser if an event or anchor element should be handled locally.","fork":false,"url":"https://api.github.com/repos/lukekarrys/local-links","forks_url":"https://api.github.com/repos/lukekarrys/local-links/forks","keys_url":"https://api.github.com/repos/lukekarrys/local-links/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lukekarrys/local-links/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lukekarrys/local-links/teams","hooks_url":"https://api.github.com/repos/lukekarrys/local-links/hooks","issue_events_url":"https://api.github.com/repos/lukekarrys/local-links/issues/events{/number}","events_url":"https://api.github.com/repos/lukekarrys/local-links/events","assignees_url":"https://api.github.com/repos/lukekarrys/local-links/assignees{/user}","branches_url":"https://api.github.com/repos/lukekarrys/local-links/branches{/branch}","tags_url":"https://api.github.com/repos/lukekarrys/local-links/tags","blobs_url":"https://api.github.com/repos/lukekarrys/local-links/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lukekarrys/local-links/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lukekarrys/local-links/git/refs{/sha}","trees_url":"https://api.github.com/repos/lukekarrys/local-links/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lukekarrys/local-links/statuses/{sha}","languages_url":"https://api.github.com/repos/lukekarrys/local-links/languages","stargazers_url":"https://api.github.com/repos/lukekarrys/local-links/stargazers","contributors_url":"https://api.github.com/repos/lukekarrys/local-links/contributors","subscribers_url":"https://api.github.com/repos/lukekarrys/local-links/subscribers","subscription_url":"https://api.github.com/repos/lukekarrys/local-links/subscription","commits_url":"https://api.github.com/repos/lukekarrys/local-links/commits{/sha}","git_commits_url":"https://api.github.com/repos/lukekarrys/local-links/git/commits{/sha}","comments_url":"https://api.github.com/repos/lukekarrys/local-links/comments{/number}","issue_comment_url":"https://api.github.com/repos/lukekarrys/local-links/issues/comments{/number}","contents_url":"https://api.github.com/repos/lukekarrys/local-links/contents/{+path}","compare_url":"https://api.github.com/repos/lukekarrys/local-links/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lukekarrys/local-links/merges","archive_url":"https://api.github.com/repos/lukekarrys/local-links/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lukekarrys/local-links/downloads","issues_url":"https://api.github.com/repos/lukekarrys/local-links/issues{/number}","pulls_url":"https://api.github.com/repos/lukekarrys/local-links/pulls{/number}","milestones_url":"https://api.github.com/repos/lukekarrys/local-links/milestones{/number}","notifications_url":"https://api.github.com/repos/lukekarrys/local-links/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lukekarrys/local-links/labels{/name}","releases_url":"https://api.github.com/repos/lukekarrys/local-links/releases{/id}","created_at":"2014-08-14T20:06:19Z","updated_at":"2015-04-20T21:07:44Z","pushed_at":"2015-04-20T20:55:42Z","git_url":"git://github.com/lukekarrys/local-links.git","ssh_url":"git@github.com:lukekarrys/local-links.git","clone_url":"https://github.com/lukekarrys/local-links.git","svn_url":"https://github.com/lukekarrys/local-links","homepage":null,"size":407,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lukekarrys/local-links/pulls/7"},"html":{"href":"https://github.com/lukekarrys/local-links/pull/7"},"issue":{"href":"https://api.github.com/repos/lukekarrys/local-links/issues/7"},"comments":{"href":"https://api.github.com/repos/lukekarrys/local-links/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/lukekarrys/local-links/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/lukekarrys/local-links/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lukekarrys/local-links/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/lukekarrys/local-links/statuses/4c7d99f53d0cee34bf477a6354fcf10cdf289c99"}}}}