{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/comments/25011470","id":25011470,"diff_hunk":"@@ -0,0 +1,95 @@\n+// This file is the friendlycode half of a proxy layer between Thimble's live preview\n+// window and bramble's codemirror instance. It was designed to map to existing\n+// friendlycode use of codemirror, with the exception of duplicate functionality\n+// between bramble and friendlycode that bramble already provides (or will)\n+define([\"backbone-events\"], function(BackboneEvents) {\n+  \"use strict\";\n+\n+  var eventCBs = {\n+    \"change\": [],\n+    \"reparse\": []\n+  };\n+\n+  function BrambleProxy(place, givenOptions) {\n+    var iframe = document.createElement(\"iframe\");\n+    var latestSource = \"(none)\";\n+    var telegraph;\n+\n+    // Event listening for proxied event messages from our editor iframe.\n+    window.addEventListener(\"message\", function(evt) {\n+      // Set the communication channel to our iframe\n+      // now that it's signaled that it has content\n+      // by sending a postMessage\n+      telegraph = iframe.contentWindow;\n+      var message = JSON.parse(evt.data);\n+      if (typeof message.type !== \"string\" || message.type.indexOf(\"bramble\") === -1) {\n+        return;\n+      }\n+      if (message.type == \"bramble:change\") {","path":"public/friendlycode/js/fc/ui/bramble-proxy.js","position":28,"original_position":28,"commit_id":"814c7b60e59e842a08c6d0b26f129aa675104d0d","original_commit_id":"814c7b60e59e842a08c6d0b26f129aa675104d0d","user":{"login":"Pomax","id":177243,"avatar_url":"https://avatars.githubusercontent.com/u/177243?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomax","html_url":"https://github.com/Pomax","followers_url":"https://api.github.com/users/Pomax/followers","following_url":"https://api.github.com/users/Pomax/following{/other_user}","gists_url":"https://api.github.com/users/Pomax/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomax/subscriptions","organizations_url":"https://api.github.com/users/Pomax/orgs","repos_url":"https://api.github.com/users/Pomax/repos","events_url":"https://api.github.com/users/Pomax/events{/privacy}","received_events_url":"https://api.github.com/users/Pomax/received_events","type":"User","site_admin":false},"body":"===","created_at":"2015-02-19T18:27:48Z","updated_at":"2015-02-19T18:27:48Z","html_url":"https://github.com/mozilla/thimble.webmaker.org/pull/469#discussion_r25011470","pull_request_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/469","_links":{"self":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/comments/25011470"},"html":{"href":"https://github.com/mozilla/thimble.webmaker.org/pull/469#discussion_r25011470"},"pull_request":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/469"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/469","id":29623040,"html_url":"https://github.com/mozilla/thimble.webmaker.org/pull/469","diff_url":"https://github.com/mozilla/thimble.webmaker.org/pull/469.diff","patch_url":"https://github.com/mozilla/thimble.webmaker.org/pull/469.patch","issue_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/469","number":469,"state":"closed","locked":false,"title":"Patched thimble to use bramble instead of codemirror","user":{"login":"sedge","id":1616860,"avatar_url":"https://avatars.githubusercontent.com/u/1616860?v=3","gravatar_id":"","url":"https://api.github.com/users/sedge","html_url":"https://github.com/sedge","followers_url":"https://api.github.com/users/sedge/followers","following_url":"https://api.github.com/users/sedge/following{/other_user}","gists_url":"https://api.github.com/users/sedge/gists{/gist_id}","starred_url":"https://api.github.com/users/sedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sedge/subscriptions","organizations_url":"https://api.github.com/users/sedge/orgs","repos_url":"https://api.github.com/users/sedge/repos","events_url":"https://api.github.com/users/sedge/events{/privacy}","received_events_url":"https://api.github.com/users/sedge/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-19T15:59:40Z","updated_at":"2015-02-19T18:27:48Z","closed_at":"2015-02-19T15:59:49Z","merged_at":null,"merge_commit_sha":"9c0f4c0947e7665fd4e9b9231deae9bf67efdd77","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/469/commits","review_comments_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/469/comments","review_comment_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/469/comments","statuses_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/statuses/814c7b60e59e842a08c6d0b26f129aa675104d0d","head":{"label":"sedge:mvpIntegration","ref":"mvpIntegration","sha":"814c7b60e59e842a08c6d0b26f129aa675104d0d","user":{"login":"sedge","id":1616860,"avatar_url":"https://avatars.githubusercontent.com/u/1616860?v=3","gravatar_id":"","url":"https://api.github.com/users/sedge","html_url":"https://github.com/sedge","followers_url":"https://api.github.com/users/sedge/followers","following_url":"https://api.github.com/users/sedge/following{/other_user}","gists_url":"https://api.github.com/users/sedge/gists{/gist_id}","starred_url":"https://api.github.com/users/sedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sedge/subscriptions","organizations_url":"https://api.github.com/users/sedge/orgs","repos_url":"https://api.github.com/users/sedge/repos","events_url":"https://api.github.com/users/sedge/events{/privacy}","received_events_url":"https://api.github.com/users/sedge/received_events","type":"User","site_admin":false},"repo":{"id":9838309,"name":"thimble.webmaker.org","full_name":"sedge/thimble.webmaker.org","owner":{"login":"sedge","id":1616860,"avatar_url":"https://avatars.githubusercontent.com/u/1616860?v=3","gravatar_id":"","url":"https://api.github.com/users/sedge","html_url":"https://github.com/sedge","followers_url":"https://api.github.com/users/sedge/followers","following_url":"https://api.github.com/users/sedge/following{/other_user}","gists_url":"https://api.github.com/users/sedge/gists{/gist_id}","starred_url":"https://api.github.com/users/sedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sedge/subscriptions","organizations_url":"https://api.github.com/users/sedge/orgs","repos_url":"https://api.github.com/users/sedge/repos","events_url":"https://api.github.com/users/sedge/events{/privacy}","received_events_url":"https://api.github.com/users/sedge/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sedge/thimble.webmaker.org","description":"a minimal thimble on node.js POC","fork":true,"url":"https://api.github.com/repos/sedge/thimble.webmaker.org","forks_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/forks","keys_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/teams","hooks_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/hooks","issue_events_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/issues/events{/number}","events_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/events","assignees_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/assignees{/user}","branches_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/branches{/branch}","tags_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/tags","blobs_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/statuses/{sha}","languages_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/languages","stargazers_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/stargazers","contributors_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/contributors","subscribers_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/subscribers","subscription_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/subscription","commits_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/issues/comments/{number}","contents_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/contents/{+path}","compare_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/merges","archive_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/downloads","issues_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/issues{/number}","pulls_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/pulls{/number}","milestones_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/milestones{/number}","notifications_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/labels{/name}","releases_url":"https://api.github.com/repos/sedge/thimble.webmaker.org/releases{/id}","created_at":"2013-05-03T15:01:51Z","updated_at":"2015-01-22T16:17:00Z","pushed_at":"2015-02-19T15:57:58Z","git_url":"git://github.com/sedge/thimble.webmaker.org.git","ssh_url":"git@github.com:sedge/thimble.webmaker.org.git","clone_url":"https://github.com/sedge/thimble.webmaker.org.git","svn_url":"https://github.com/sedge/thimble.webmaker.org","homepage":null,"size":16219,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"1613ce087ab5a9dbece1d402ce8166c4d5170529","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":9349840,"name":"thimble.webmaker.org","full_name":"mozilla/thimble.webmaker.org","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/thimble.webmaker.org","description":"Thimble coding editor","fork":false,"url":"https://api.github.com/repos/mozilla/thimble.webmaker.org","forks_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/forks","keys_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/teams","hooks_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/hooks","issue_events_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/events","assignees_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/tags","blobs_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/languages","stargazers_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/stargazers","contributors_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/contributors","subscribers_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/subscribers","subscription_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/subscription","commits_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/merges","archive_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/downloads","issues_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/releases{/id}","created_at":"2013-04-10T15:54:34Z","updated_at":"2015-02-17T01:17:29Z","pushed_at":"2015-02-05T18:24:34Z","git_url":"git://github.com/mozilla/thimble.webmaker.org.git","ssh_url":"git@github.com:mozilla/thimble.webmaker.org.git","clone_url":"https://github.com/mozilla/thimble.webmaker.org.git","svn_url":"https://github.com/mozilla/thimble.webmaker.org","homepage":"thimble.webmaker.org","size":19922,"stargazers_count":53,"watchers_count":53,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":17,"forks":62,"open_issues":17,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/469"},"html":{"href":"https://github.com/mozilla/thimble.webmaker.org/pull/469"},"issue":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/469"},"comments":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/469/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/469/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/469/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/statuses/814c7b60e59e842a08c6d0b26f129aa675104d0d"}}}}