{"action":"created","comment":{"url":"https://api.github.com/repos/humphd/brackets/pulls/comments/36584280","id":36584280,"diff_hunk":"@@ -0,0 +1,133 @@\n+/**\n+ * NOTE: this is meant for debugging Bramble, and as an example\n+ * of how to do basic things with the API. It wasn't intended as a production setup.\n+ *\n+ * Use ?forceFiles=1 to force startup to re-install the default files\n+ */\n+(function() {\n+    \"use strict\";\n+\n+    require.config({\n+        baseUrl: './'\n+    });\n+\n+    // Allow the user to override what we do with default files using `?forceFiles=1`\n+    var forceFiles = window.location.search.indexOf(\"forceFiles=1\") > -1;\n+\n+    // Default filesystem content\n+    var projectRoot = \"/7/projects/30\";\n+\n+    var index = \"<html>\\n\"                                  +","path":"src/hosted.js","position":20,"original_position":20,"commit_id":"59afcd9f97d45093739a7d098a2bfe65375ec52a","original_commit_id":"59afcd9f97d45093739a7d098a2bfe65375ec52a","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":"alternative: `[\"<html>\", \"<head\", \"...\"].join(\"\\n\")`","created_at":"2015-08-09T04:05:24Z","updated_at":"2015-08-09T04:05:24Z","html_url":"https://github.com/humphd/brackets/pull/415#discussion_r36584280","pull_request_url":"https://api.github.com/repos/humphd/brackets/pulls/415","_links":{"self":{"href":"https://api.github.com/repos/humphd/brackets/pulls/comments/36584280"},"html":{"href":"https://github.com/humphd/brackets/pull/415#discussion_r36584280"},"pull_request":{"href":"https://api.github.com/repos/humphd/brackets/pulls/415"}}},"pull_request":{"url":"https://api.github.com/repos/humphd/brackets/pulls/415","id":41964268,"html_url":"https://github.com/humphd/brackets/pull/415","diff_url":"https://github.com/humphd/brackets/pull/415.diff","patch_url":"https://github.com/humphd/brackets/pull/415.patch","issue_url":"https://api.github.com/repos/humphd/brackets/issues/415","number":415,"state":"open","locked":false,"title":"Fix #414: don't automatically overwrite default files on startup in hosted.html","user":{"login":"humphd","id":427398,"avatar_url":"https://avatars.githubusercontent.com/u/427398?v=3","gravatar_id":"","url":"https://api.github.com/users/humphd","html_url":"https://github.com/humphd","followers_url":"https://api.github.com/users/humphd/followers","following_url":"https://api.github.com/users/humphd/following{/other_user}","gists_url":"https://api.github.com/users/humphd/gists{/gist_id}","starred_url":"https://api.github.com/users/humphd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humphd/subscriptions","organizations_url":"https://api.github.com/users/humphd/orgs","repos_url":"https://api.github.com/users/humphd/repos","events_url":"https://api.github.com/users/humphd/events{/privacy}","received_events_url":"https://api.github.com/users/humphd/received_events","type":"User","site_admin":false},"body":"Fixes an annoyance @Pomax filed.  With this we only write the default files once with `hosted.html`, and subsequent reloads just use whatever is there.  This means you can mess things up by removing all your files; but using `?forceFiles=1` will reset them if you need to do so later.","created_at":"2015-08-09T02:41:44Z","updated_at":"2015-08-09T04:05:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ee320c84b8d798512ea3ec123929fcf87424b7f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/humphd/brackets/pulls/415/commits","review_comments_url":"https://api.github.com/repos/humphd/brackets/pulls/415/comments","review_comment_url":"https://api.github.com/repos/humphd/brackets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/humphd/brackets/issues/415/comments","statuses_url":"https://api.github.com/repos/humphd/brackets/statuses/59afcd9f97d45093739a7d098a2bfe65375ec52a","head":{"label":"humphd:issue414","ref":"issue414","sha":"59afcd9f97d45093739a7d098a2bfe65375ec52a","user":{"login":"humphd","id":427398,"avatar_url":"https://avatars.githubusercontent.com/u/427398?v=3","gravatar_id":"","url":"https://api.github.com/users/humphd","html_url":"https://github.com/humphd","followers_url":"https://api.github.com/users/humphd/followers","following_url":"https://api.github.com/users/humphd/following{/other_user}","gists_url":"https://api.github.com/users/humphd/gists{/gist_id}","starred_url":"https://api.github.com/users/humphd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humphd/subscriptions","organizations_url":"https://api.github.com/users/humphd/orgs","repos_url":"https://api.github.com/users/humphd/repos","events_url":"https://api.github.com/users/humphd/events{/privacy}","received_events_url":"https://api.github.com/users/humphd/received_events","type":"User","site_admin":false},"repo":{"id":13729434,"name":"brackets","full_name":"humphd/brackets","owner":{"login":"humphd","id":427398,"avatar_url":"https://avatars.githubusercontent.com/u/427398?v=3","gravatar_id":"","url":"https://api.github.com/users/humphd","html_url":"https://github.com/humphd","followers_url":"https://api.github.com/users/humphd/followers","following_url":"https://api.github.com/users/humphd/following{/other_user}","gists_url":"https://api.github.com/users/humphd/gists{/gist_id}","starred_url":"https://api.github.com/users/humphd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humphd/subscriptions","organizations_url":"https://api.github.com/users/humphd/orgs","repos_url":"https://api.github.com/users/humphd/repos","events_url":"https://api.github.com/users/humphd/events{/privacy}","received_events_url":"https://api.github.com/users/humphd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/humphd/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":true,"url":"https://api.github.com/repos/humphd/brackets","forks_url":"https://api.github.com/repos/humphd/brackets/forks","keys_url":"https://api.github.com/repos/humphd/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/humphd/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/humphd/brackets/teams","hooks_url":"https://api.github.com/repos/humphd/brackets/hooks","issue_events_url":"https://api.github.com/repos/humphd/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/humphd/brackets/events","assignees_url":"https://api.github.com/repos/humphd/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/humphd/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/humphd/brackets/tags","blobs_url":"https://api.github.com/repos/humphd/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/humphd/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/humphd/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/humphd/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/humphd/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/humphd/brackets/languages","stargazers_url":"https://api.github.com/repos/humphd/brackets/stargazers","contributors_url":"https://api.github.com/repos/humphd/brackets/contributors","subscribers_url":"https://api.github.com/repos/humphd/brackets/subscribers","subscription_url":"https://api.github.com/repos/humphd/brackets/subscription","commits_url":"https://api.github.com/repos/humphd/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/humphd/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/humphd/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/humphd/brackets/issues/comments{/number}","contents_url":"https://api.github.com/repos/humphd/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/humphd/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/humphd/brackets/merges","archive_url":"https://api.github.com/repos/humphd/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/humphd/brackets/downloads","issues_url":"https://api.github.com/repos/humphd/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/humphd/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/humphd/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/humphd/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/humphd/brackets/labels{/name}","releases_url":"https://api.github.com/repos/humphd/brackets/releases{/id}","created_at":"2013-10-21T00:12:49Z","updated_at":"2015-08-08T16:13:18Z","pushed_at":"2015-08-09T02:41:45Z","git_url":"git://github.com/humphd/brackets.git","ssh_url":"git@github.com:humphd/brackets.git","clone_url":"https://github.com/humphd/brackets.git","svn_url":"https://github.com/humphd/brackets","homepage":"http://brackets.io","size":85709,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":33,"forks":17,"open_issues":33,"watchers":19,"default_branch":"bramble"}},"base":{"label":"humphd:bramble","ref":"bramble","sha":"3ba51b4462f523241303dbe5538336cf2f09817a","user":{"login":"humphd","id":427398,"avatar_url":"https://avatars.githubusercontent.com/u/427398?v=3","gravatar_id":"","url":"https://api.github.com/users/humphd","html_url":"https://github.com/humphd","followers_url":"https://api.github.com/users/humphd/followers","following_url":"https://api.github.com/users/humphd/following{/other_user}","gists_url":"https://api.github.com/users/humphd/gists{/gist_id}","starred_url":"https://api.github.com/users/humphd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humphd/subscriptions","organizations_url":"https://api.github.com/users/humphd/orgs","repos_url":"https://api.github.com/users/humphd/repos","events_url":"https://api.github.com/users/humphd/events{/privacy}","received_events_url":"https://api.github.com/users/humphd/received_events","type":"User","site_admin":false},"repo":{"id":13729434,"name":"brackets","full_name":"humphd/brackets","owner":{"login":"humphd","id":427398,"avatar_url":"https://avatars.githubusercontent.com/u/427398?v=3","gravatar_id":"","url":"https://api.github.com/users/humphd","html_url":"https://github.com/humphd","followers_url":"https://api.github.com/users/humphd/followers","following_url":"https://api.github.com/users/humphd/following{/other_user}","gists_url":"https://api.github.com/users/humphd/gists{/gist_id}","starred_url":"https://api.github.com/users/humphd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humphd/subscriptions","organizations_url":"https://api.github.com/users/humphd/orgs","repos_url":"https://api.github.com/users/humphd/repos","events_url":"https://api.github.com/users/humphd/events{/privacy}","received_events_url":"https://api.github.com/users/humphd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/humphd/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":true,"url":"https://api.github.com/repos/humphd/brackets","forks_url":"https://api.github.com/repos/humphd/brackets/forks","keys_url":"https://api.github.com/repos/humphd/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/humphd/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/humphd/brackets/teams","hooks_url":"https://api.github.com/repos/humphd/brackets/hooks","issue_events_url":"https://api.github.com/repos/humphd/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/humphd/brackets/events","assignees_url":"https://api.github.com/repos/humphd/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/humphd/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/humphd/brackets/tags","blobs_url":"https://api.github.com/repos/humphd/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/humphd/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/humphd/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/humphd/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/humphd/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/humphd/brackets/languages","stargazers_url":"https://api.github.com/repos/humphd/brackets/stargazers","contributors_url":"https://api.github.com/repos/humphd/brackets/contributors","subscribers_url":"https://api.github.com/repos/humphd/brackets/subscribers","subscription_url":"https://api.github.com/repos/humphd/brackets/subscription","commits_url":"https://api.github.com/repos/humphd/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/humphd/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/humphd/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/humphd/brackets/issues/comments{/number}","contents_url":"https://api.github.com/repos/humphd/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/humphd/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/humphd/brackets/merges","archive_url":"https://api.github.com/repos/humphd/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/humphd/brackets/downloads","issues_url":"https://api.github.com/repos/humphd/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/humphd/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/humphd/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/humphd/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/humphd/brackets/labels{/name}","releases_url":"https://api.github.com/repos/humphd/brackets/releases{/id}","created_at":"2013-10-21T00:12:49Z","updated_at":"2015-08-08T16:13:18Z","pushed_at":"2015-08-09T02:41:45Z","git_url":"git://github.com/humphd/brackets.git","ssh_url":"git@github.com:humphd/brackets.git","clone_url":"https://github.com/humphd/brackets.git","svn_url":"https://github.com/humphd/brackets","homepage":"http://brackets.io","size":85709,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":33,"forks":17,"open_issues":33,"watchers":19,"default_branch":"bramble"}},"_links":{"self":{"href":"https://api.github.com/repos/humphd/brackets/pulls/415"},"html":{"href":"https://github.com/humphd/brackets/pull/415"},"issue":{"href":"https://api.github.com/repos/humphd/brackets/issues/415"},"comments":{"href":"https://api.github.com/repos/humphd/brackets/issues/415/comments"},"review_comments":{"href":"https://api.github.com/repos/humphd/brackets/pulls/415/comments"},"review_comment":{"href":"https://api.github.com/repos/humphd/brackets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/humphd/brackets/pulls/415/commits"},"statuses":{"href":"https://api.github.com/repos/humphd/brackets/statuses/59afcd9f97d45093739a7d098a2bfe65375ec52a"}}}}