{"action":"created","comment":{"url":"https://api.github.com/repos/daviferreira/medium-editor/pulls/comments/30992810","id":30992810,"diff_hunk":"@@ -20,11 +20,9 @@ var AnchorPreview;\n         previewValueSelector: 'a',\n \n         /* ----- internal options needed from base ----- */\n-        'window': window,\n-        'document': document,","path":"src/js/extensions/anchor-preview.js","position":5,"original_position":5,"commit_id":"a4c1c5372e67ad8771d6e764838847f2d64e2c4f","original_commit_id":"a4c1c5372e67ad8771d6e764838847f2d64e2c4f","user":{"login":"j0k3r","id":62333,"avatar_url":"https://avatars.githubusercontent.com/u/62333?v=3","gravatar_id":"","url":"https://api.github.com/users/j0k3r","html_url":"https://github.com/j0k3r","followers_url":"https://api.github.com/users/j0k3r/followers","following_url":"https://api.github.com/users/j0k3r/following{/other_user}","gists_url":"https://api.github.com/users/j0k3r/gists{/gist_id}","starred_url":"https://api.github.com/users/j0k3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j0k3r/subscriptions","organizations_url":"https://api.github.com/users/j0k3r/orgs","repos_url":"https://api.github.com/users/j0k3r/repos","events_url":"https://api.github.com/users/j0k3r/events{/privacy}","received_events_url":"https://api.github.com/users/j0k3r/received_events","type":"User","site_admin":false},"body":"`document` & `window` are automatically attached to any extensions now?","created_at":"2015-05-25T19:49:46Z","updated_at":"2015-05-25T19:49:46Z","html_url":"https://github.com/daviferreira/medium-editor/pull/633#discussion_r30992810","pull_request_url":"https://api.github.com/repos/daviferreira/medium-editor/pulls/633","_links":{"self":{"href":"https://api.github.com/repos/daviferreira/medium-editor/pulls/comments/30992810"},"html":{"href":"https://github.com/daviferreira/medium-editor/pull/633#discussion_r30992810"},"pull_request":{"href":"https://api.github.com/repos/daviferreira/medium-editor/pulls/633"}}},"pull_request":{"url":"https://api.github.com/repos/daviferreira/medium-editor/pulls/633","id":36146285,"html_url":"https://github.com/daviferreira/medium-editor/pull/633","diff_url":"https://github.com/daviferreira/medium-editor/pull/633.diff","patch_url":"https://github.com/daviferreira/medium-editor/pull/633.patch","issue_url":"https://api.github.com/repos/daviferreira/medium-editor/issues/633","number":633,"state":"open","locked":false,"title":"Create extension helper methods","user":{"login":"nmielnik","id":2444240,"avatar_url":"https://avatars.githubusercontent.com/u/2444240?v=3","gravatar_id":"","url":"https://api.github.com/users/nmielnik","html_url":"https://github.com/nmielnik","followers_url":"https://api.github.com/users/nmielnik/followers","following_url":"https://api.github.com/users/nmielnik/following{/other_user}","gists_url":"https://api.github.com/users/nmielnik/gists{/gist_id}","starred_url":"https://api.github.com/users/nmielnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmielnik/subscriptions","organizations_url":"https://api.github.com/users/nmielnik/orgs","repos_url":"https://api.github.com/users/nmielnik/repos","events_url":"https://api.github.com/users/nmielnik/events{/privacy}","received_events_url":"https://api.github.com/users/nmielnik/received_events","type":"User","site_admin":false},"body":"This PR adds some helper methods to all extensions, including accessors into MediumEditor methods + properties.  There are also some minor changes to cleanup tests and remove unneeded defaults from extensions.\r\n\r\n* `.on()` + `.off()` -> helpers that call directly into `MediumEditor.on()` + `MediumEditor.off()`\r\n* `.subscribe()` -> calls directly into `MediumEditor.subscribe()`\r\n* `.execAction()` -> calls directly into `MediumEditor.execAction()`\r\n* `.getEditorElements()` + `.getEditorId()` -> accessors for MediumEditor's array of elements and unique id (respectively)\r\n* `.getEditorOption()` -> accessor for specific MediumEditor options","created_at":"2015-05-25T15:38:28Z","updated_at":"2015-05-25T19:49:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac46485622652d6731f7a1284c14f986108b11b9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/daviferreira/medium-editor/pulls/633/commits","review_comments_url":"https://api.github.com/repos/daviferreira/medium-editor/pulls/633/comments","review_comment_url":"https://api.github.com/repos/daviferreira/medium-editor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/daviferreira/medium-editor/issues/633/comments","statuses_url":"https://api.github.com/repos/daviferreira/medium-editor/statuses/a4c1c5372e67ad8771d6e764838847f2d64e2c4f","head":{"label":"daviferreira:extension-helper-methods","ref":"extension-helper-methods","sha":"a4c1c5372e67ad8771d6e764838847f2d64e2c4f","user":{"login":"daviferreira","id":38787,"avatar_url":"https://avatars.githubusercontent.com/u/38787?v=3","gravatar_id":"","url":"https://api.github.com/users/daviferreira","html_url":"https://github.com/daviferreira","followers_url":"https://api.github.com/users/daviferreira/followers","following_url":"https://api.github.com/users/daviferreira/following{/other_user}","gists_url":"https://api.github.com/users/daviferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/daviferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviferreira/subscriptions","organizations_url":"https://api.github.com/users/daviferreira/orgs","repos_url":"https://api.github.com/users/daviferreira/repos","events_url":"https://api.github.com/users/daviferreira/events{/privacy}","received_events_url":"https://api.github.com/users/daviferreira/received_events","type":"User","site_admin":false},"repo":{"id":10365411,"name":"medium-editor","full_name":"daviferreira/medium-editor","owner":{"login":"daviferreira","id":38787,"avatar_url":"https://avatars.githubusercontent.com/u/38787?v=3","gravatar_id":"","url":"https://api.github.com/users/daviferreira","html_url":"https://github.com/daviferreira","followers_url":"https://api.github.com/users/daviferreira/followers","following_url":"https://api.github.com/users/daviferreira/following{/other_user}","gists_url":"https://api.github.com/users/daviferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/daviferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviferreira/subscriptions","organizations_url":"https://api.github.com/users/daviferreira/orgs","repos_url":"https://api.github.com/users/daviferreira/repos","events_url":"https://api.github.com/users/daviferreira/events{/privacy}","received_events_url":"https://api.github.com/users/daviferreira/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daviferreira/medium-editor","description":"Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution.","fork":false,"url":"https://api.github.com/repos/daviferreira/medium-editor","forks_url":"https://api.github.com/repos/daviferreira/medium-editor/forks","keys_url":"https://api.github.com/repos/daviferreira/medium-editor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daviferreira/medium-editor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daviferreira/medium-editor/teams","hooks_url":"https://api.github.com/repos/daviferreira/medium-editor/hooks","issue_events_url":"https://api.github.com/repos/daviferreira/medium-editor/issues/events{/number}","events_url":"https://api.github.com/repos/daviferreira/medium-editor/events","assignees_url":"https://api.github.com/repos/daviferreira/medium-editor/assignees{/user}","branches_url":"https://api.github.com/repos/daviferreira/medium-editor/branches{/branch}","tags_url":"https://api.github.com/repos/daviferreira/medium-editor/tags","blobs_url":"https://api.github.com/repos/daviferreira/medium-editor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daviferreira/medium-editor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daviferreira/medium-editor/git/refs{/sha}","trees_url":"https://api.github.com/repos/daviferreira/medium-editor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daviferreira/medium-editor/statuses/{sha}","languages_url":"https://api.github.com/repos/daviferreira/medium-editor/languages","stargazers_url":"https://api.github.com/repos/daviferreira/medium-editor/stargazers","contributors_url":"https://api.github.com/repos/daviferreira/medium-editor/contributors","subscribers_url":"https://api.github.com/repos/daviferreira/medium-editor/subscribers","subscription_url":"https://api.github.com/repos/daviferreira/medium-editor/subscription","commits_url":"https://api.github.com/repos/daviferreira/medium-editor/commits{/sha}","git_commits_url":"https://api.github.com/repos/daviferreira/medium-editor/git/commits{/sha}","comments_url":"https://api.github.com/repos/daviferreira/medium-editor/comments{/number}","issue_comment_url":"https://api.github.com/repos/daviferreira/medium-editor/issues/comments{/number}","contents_url":"https://api.github.com/repos/daviferreira/medium-editor/contents/{+path}","compare_url":"https://api.github.com/repos/daviferreira/medium-editor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daviferreira/medium-editor/merges","archive_url":"https://api.github.com/repos/daviferreira/medium-editor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daviferreira/medium-editor/downloads","issues_url":"https://api.github.com/repos/daviferreira/medium-editor/issues{/number}","pulls_url":"https://api.github.com/repos/daviferreira/medium-editor/pulls{/number}","milestones_url":"https://api.github.com/repos/daviferreira/medium-editor/milestones{/number}","notifications_url":"https://api.github.com/repos/daviferreira/medium-editor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daviferreira/medium-editor/labels{/name}","releases_url":"https://api.github.com/repos/daviferreira/medium-editor/releases{/id}","created_at":"2013-05-29T17:40:11Z","updated_at":"2015-05-25T15:17:36Z","pushed_at":"2015-05-25T17:30:59Z","git_url":"git://github.com/daviferreira/medium-editor.git","ssh_url":"git@github.com:daviferreira/medium-editor.git","clone_url":"https://github.com/daviferreira/medium-editor.git","svn_url":"https://github.com/daviferreira/medium-editor","homepage":"https://daviferreira.github.io/medium-editor/","size":12811,"stargazers_count":5023,"watchers_count":5023,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":617,"mirror_url":null,"open_issues_count":83,"forks":617,"open_issues":83,"watchers":5023,"default_branch":"master"}},"base":{"label":"daviferreira:master","ref":"master","sha":"ab697a8382e8c37ba55d85e9381c9263a38632e0","user":{"login":"daviferreira","id":38787,"avatar_url":"https://avatars.githubusercontent.com/u/38787?v=3","gravatar_id":"","url":"https://api.github.com/users/daviferreira","html_url":"https://github.com/daviferreira","followers_url":"https://api.github.com/users/daviferreira/followers","following_url":"https://api.github.com/users/daviferreira/following{/other_user}","gists_url":"https://api.github.com/users/daviferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/daviferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviferreira/subscriptions","organizations_url":"https://api.github.com/users/daviferreira/orgs","repos_url":"https://api.github.com/users/daviferreira/repos","events_url":"https://api.github.com/users/daviferreira/events{/privacy}","received_events_url":"https://api.github.com/users/daviferreira/received_events","type":"User","site_admin":false},"repo":{"id":10365411,"name":"medium-editor","full_name":"daviferreira/medium-editor","owner":{"login":"daviferreira","id":38787,"avatar_url":"https://avatars.githubusercontent.com/u/38787?v=3","gravatar_id":"","url":"https://api.github.com/users/daviferreira","html_url":"https://github.com/daviferreira","followers_url":"https://api.github.com/users/daviferreira/followers","following_url":"https://api.github.com/users/daviferreira/following{/other_user}","gists_url":"https://api.github.com/users/daviferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/daviferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviferreira/subscriptions","organizations_url":"https://api.github.com/users/daviferreira/orgs","repos_url":"https://api.github.com/users/daviferreira/repos","events_url":"https://api.github.com/users/daviferreira/events{/privacy}","received_events_url":"https://api.github.com/users/daviferreira/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daviferreira/medium-editor","description":"Medium.com WYSIWYG editor clone. Uses contenteditable API to implement a rich text solution.","fork":false,"url":"https://api.github.com/repos/daviferreira/medium-editor","forks_url":"https://api.github.com/repos/daviferreira/medium-editor/forks","keys_url":"https://api.github.com/repos/daviferreira/medium-editor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daviferreira/medium-editor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daviferreira/medium-editor/teams","hooks_url":"https://api.github.com/repos/daviferreira/medium-editor/hooks","issue_events_url":"https://api.github.com/repos/daviferreira/medium-editor/issues/events{/number}","events_url":"https://api.github.com/repos/daviferreira/medium-editor/events","assignees_url":"https://api.github.com/repos/daviferreira/medium-editor/assignees{/user}","branches_url":"https://api.github.com/repos/daviferreira/medium-editor/branches{/branch}","tags_url":"https://api.github.com/repos/daviferreira/medium-editor/tags","blobs_url":"https://api.github.com/repos/daviferreira/medium-editor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daviferreira/medium-editor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daviferreira/medium-editor/git/refs{/sha}","trees_url":"https://api.github.com/repos/daviferreira/medium-editor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daviferreira/medium-editor/statuses/{sha}","languages_url":"https://api.github.com/repos/daviferreira/medium-editor/languages","stargazers_url":"https://api.github.com/repos/daviferreira/medium-editor/stargazers","contributors_url":"https://api.github.com/repos/daviferreira/medium-editor/contributors","subscribers_url":"https://api.github.com/repos/daviferreira/medium-editor/subscribers","subscription_url":"https://api.github.com/repos/daviferreira/medium-editor/subscription","commits_url":"https://api.github.com/repos/daviferreira/medium-editor/commits{/sha}","git_commits_url":"https://api.github.com/repos/daviferreira/medium-editor/git/commits{/sha}","comments_url":"https://api.github.com/repos/daviferreira/medium-editor/comments{/number}","issue_comment_url":"https://api.github.com/repos/daviferreira/medium-editor/issues/comments{/number}","contents_url":"https://api.github.com/repos/daviferreira/medium-editor/contents/{+path}","compare_url":"https://api.github.com/repos/daviferreira/medium-editor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daviferreira/medium-editor/merges","archive_url":"https://api.github.com/repos/daviferreira/medium-editor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daviferreira/medium-editor/downloads","issues_url":"https://api.github.com/repos/daviferreira/medium-editor/issues{/number}","pulls_url":"https://api.github.com/repos/daviferreira/medium-editor/pulls{/number}","milestones_url":"https://api.github.com/repos/daviferreira/medium-editor/milestones{/number}","notifications_url":"https://api.github.com/repos/daviferreira/medium-editor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daviferreira/medium-editor/labels{/name}","releases_url":"https://api.github.com/repos/daviferreira/medium-editor/releases{/id}","created_at":"2013-05-29T17:40:11Z","updated_at":"2015-05-25T15:17:36Z","pushed_at":"2015-05-25T17:30:59Z","git_url":"git://github.com/daviferreira/medium-editor.git","ssh_url":"git@github.com:daviferreira/medium-editor.git","clone_url":"https://github.com/daviferreira/medium-editor.git","svn_url":"https://github.com/daviferreira/medium-editor","homepage":"https://daviferreira.github.io/medium-editor/","size":12811,"stargazers_count":5023,"watchers_count":5023,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":617,"mirror_url":null,"open_issues_count":83,"forks":617,"open_issues":83,"watchers":5023,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/daviferreira/medium-editor/pulls/633"},"html":{"href":"https://github.com/daviferreira/medium-editor/pull/633"},"issue":{"href":"https://api.github.com/repos/daviferreira/medium-editor/issues/633"},"comments":{"href":"https://api.github.com/repos/daviferreira/medium-editor/issues/633/comments"},"review_comments":{"href":"https://api.github.com/repos/daviferreira/medium-editor/pulls/633/comments"},"review_comment":{"href":"https://api.github.com/repos/daviferreira/medium-editor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/daviferreira/medium-editor/pulls/633/commits"},"statuses":{"href":"https://api.github.com/repos/daviferreira/medium-editor/statuses/a4c1c5372e67ad8771d6e764838847f2d64e2c4f"}}}}