{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/oghliner/pulls/comments/49092234","id":49092234,"diff_hunk":"@@ -107,6 +107,15 @@\n       });\n     },\n \n+    // Make requests to directories become requests to index.html\n+    extendToIndex: function (request) {\n+      var url = request.url;\n+      if (url[url.length - 1] === '/') {\n+        url += 'index.html';\n+      }\n+      return new Request(url, request);","path":"templates/app/offline-worker.js","position":30,"original_position":30,"commit_id":"0a6c52694f8a724eeedb76c6f0cf5c37a877ad7a","original_commit_id":"0a6c52694f8a724eeedb76c6f0cf5c37a877ad7a","user":{"login":"marco-c","id":1616846,"avatar_url":"https://avatars.githubusercontent.com/u/1616846?v=3","gravatar_id":"","url":"https://api.github.com/users/marco-c","html_url":"https://github.com/marco-c","followers_url":"https://api.github.com/users/marco-c/followers","following_url":"https://api.github.com/users/marco-c/following{/other_user}","gists_url":"https://api.github.com/users/marco-c/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-c/subscriptions","organizations_url":"https://api.github.com/users/marco-c/orgs","repos_url":"https://api.github.com/users/marco-c/repos","events_url":"https://api.github.com/users/marco-c/events{/privacy}","received_events_url":"https://api.github.com/users/marco-c/received_events","type":"User","site_admin":false},"body":"Nit: I guess it doesn't really matter, but we can avoid creating a new Request object when we don't need to rewrite the url.","created_at":"2016-01-07T16:29:12Z","updated_at":"2016-01-07T16:29:12Z","html_url":"https://github.com/mozilla/oghliner/pull/254#discussion_r49092234","pull_request_url":"https://api.github.com/repos/mozilla/oghliner/pulls/254","_links":{"self":{"href":"https://api.github.com/repos/mozilla/oghliner/pulls/comments/49092234"},"html":{"href":"https://github.com/mozilla/oghliner/pull/254#discussion_r49092234"},"pull_request":{"href":"https://api.github.com/repos/mozilla/oghliner/pulls/254"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/oghliner/pulls/254","id":55340707,"html_url":"https://github.com/mozilla/oghliner/pull/254","diff_url":"https://github.com/mozilla/oghliner/pull/254.diff","patch_url":"https://github.com/mozilla/oghliner/pull/254.patch","issue_url":"https://api.github.com/repos/mozilla/oghliner/issues/254","number":254,"state":"open","locked":false,"title":"Make requests to directories become requests to index.html","user":{"login":"delapuente","id":757942,"avatar_url":"https://avatars.githubusercontent.com/u/757942?v=3","gravatar_id":"","url":"https://api.github.com/users/delapuente","html_url":"https://github.com/delapuente","followers_url":"https://api.github.com/users/delapuente/followers","following_url":"https://api.github.com/users/delapuente/following{/other_user}","gists_url":"https://api.github.com/users/delapuente/gists{/gist_id}","starred_url":"https://api.github.com/users/delapuente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delapuente/subscriptions","organizations_url":"https://api.github.com/users/delapuente/orgs","repos_url":"https://api.github.com/users/delapuente/repos","events_url":"https://api.github.com/users/delapuente/events{/privacy}","received_events_url":"https://api.github.com/users/delapuente/received_events","type":"User","site_admin":false},"body":"Fix #253 ","created_at":"2016-01-07T14:02:41Z","updated_at":"2016-01-07T16:29:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aeb4dc65edc3ac2914523e0fa41d55126d277c55","assignee":{"login":"marco-c","id":1616846,"avatar_url":"https://avatars.githubusercontent.com/u/1616846?v=3","gravatar_id":"","url":"https://api.github.com/users/marco-c","html_url":"https://github.com/marco-c","followers_url":"https://api.github.com/users/marco-c/followers","following_url":"https://api.github.com/users/marco-c/following{/other_user}","gists_url":"https://api.github.com/users/marco-c/gists{/gist_id}","starred_url":"https://api.github.com/users/marco-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marco-c/subscriptions","organizations_url":"https://api.github.com/users/marco-c/orgs","repos_url":"https://api.github.com/users/marco-c/repos","events_url":"https://api.github.com/users/marco-c/events{/privacy}","received_events_url":"https://api.github.com/users/marco-c/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/oghliner/pulls/254/commits","review_comments_url":"https://api.github.com/repos/mozilla/oghliner/pulls/254/comments","review_comment_url":"https://api.github.com/repos/mozilla/oghliner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/oghliner/issues/254/comments","statuses_url":"https://api.github.com/repos/mozilla/oghliner/statuses/0a6c52694f8a724eeedb76c6f0cf5c37a877ad7a","head":{"label":"delapuente:serve-index-when-requesting-folder","ref":"serve-index-when-requesting-folder","sha":"0a6c52694f8a724eeedb76c6f0cf5c37a877ad7a","user":{"login":"delapuente","id":757942,"avatar_url":"https://avatars.githubusercontent.com/u/757942?v=3","gravatar_id":"","url":"https://api.github.com/users/delapuente","html_url":"https://github.com/delapuente","followers_url":"https://api.github.com/users/delapuente/followers","following_url":"https://api.github.com/users/delapuente/following{/other_user}","gists_url":"https://api.github.com/users/delapuente/gists{/gist_id}","starred_url":"https://api.github.com/users/delapuente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delapuente/subscriptions","organizations_url":"https://api.github.com/users/delapuente/orgs","repos_url":"https://api.github.com/users/delapuente/repos","events_url":"https://api.github.com/users/delapuente/events{/privacy}","received_events_url":"https://api.github.com/users/delapuente/received_events","type":"User","site_admin":false},"repo":{"id":44406164,"name":"oghliner","full_name":"delapuente/oghliner","owner":{"login":"delapuente","id":757942,"avatar_url":"https://avatars.githubusercontent.com/u/757942?v=3","gravatar_id":"","url":"https://api.github.com/users/delapuente","html_url":"https://github.com/delapuente","followers_url":"https://api.github.com/users/delapuente/followers","following_url":"https://api.github.com/users/delapuente/following{/other_user}","gists_url":"https://api.github.com/users/delapuente/gists{/gist_id}","starred_url":"https://api.github.com/users/delapuente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delapuente/subscriptions","organizations_url":"https://api.github.com/users/delapuente/orgs","repos_url":"https://api.github.com/users/delapuente/repos","events_url":"https://api.github.com/users/delapuente/events{/privacy}","received_events_url":"https://api.github.com/users/delapuente/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/delapuente/oghliner","description":"template and tool for deploying Offline Web Apps to GitHub Pages","fork":true,"url":"https://api.github.com/repos/delapuente/oghliner","forks_url":"https://api.github.com/repos/delapuente/oghliner/forks","keys_url":"https://api.github.com/repos/delapuente/oghliner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/delapuente/oghliner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/delapuente/oghliner/teams","hooks_url":"https://api.github.com/repos/delapuente/oghliner/hooks","issue_events_url":"https://api.github.com/repos/delapuente/oghliner/issues/events{/number}","events_url":"https://api.github.com/repos/delapuente/oghliner/events","assignees_url":"https://api.github.com/repos/delapuente/oghliner/assignees{/user}","branches_url":"https://api.github.com/repos/delapuente/oghliner/branches{/branch}","tags_url":"https://api.github.com/repos/delapuente/oghliner/tags","blobs_url":"https://api.github.com/repos/delapuente/oghliner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/delapuente/oghliner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/delapuente/oghliner/git/refs{/sha}","trees_url":"https://api.github.com/repos/delapuente/oghliner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/delapuente/oghliner/statuses/{sha}","languages_url":"https://api.github.com/repos/delapuente/oghliner/languages","stargazers_url":"https://api.github.com/repos/delapuente/oghliner/stargazers","contributors_url":"https://api.github.com/repos/delapuente/oghliner/contributors","subscribers_url":"https://api.github.com/repos/delapuente/oghliner/subscribers","subscription_url":"https://api.github.com/repos/delapuente/oghliner/subscription","commits_url":"https://api.github.com/repos/delapuente/oghliner/commits{/sha}","git_commits_url":"https://api.github.com/repos/delapuente/oghliner/git/commits{/sha}","comments_url":"https://api.github.com/repos/delapuente/oghliner/comments{/number}","issue_comment_url":"https://api.github.com/repos/delapuente/oghliner/issues/comments{/number}","contents_url":"https://api.github.com/repos/delapuente/oghliner/contents/{+path}","compare_url":"https://api.github.com/repos/delapuente/oghliner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/delapuente/oghliner/merges","archive_url":"https://api.github.com/repos/delapuente/oghliner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/delapuente/oghliner/downloads","issues_url":"https://api.github.com/repos/delapuente/oghliner/issues{/number}","pulls_url":"https://api.github.com/repos/delapuente/oghliner/pulls{/number}","milestones_url":"https://api.github.com/repos/delapuente/oghliner/milestones{/number}","notifications_url":"https://api.github.com/repos/delapuente/oghliner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/delapuente/oghliner/labels{/name}","releases_url":"https://api.github.com/repos/delapuente/oghliner/releases{/id}","created_at":"2015-10-16T19:26:00Z","updated_at":"2015-10-16T19:26:01Z","pushed_at":"2016-01-07T13:59:20Z","git_url":"git://github.com/delapuente/oghliner.git","ssh_url":"git@github.com:delapuente/oghliner.git","clone_url":"https://github.com/delapuente/oghliner.git","svn_url":"https://github.com/delapuente/oghliner","homepage":"https://mozilla.github.io/oghliner/","size":658,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"2a05541f87f98f72d6a029499a251f0a6b44f274","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":42184542,"name":"oghliner","full_name":"mozilla/oghliner","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/oghliner","description":"template and tool for deploying Offline Web Apps to GitHub Pages","fork":false,"url":"https://api.github.com/repos/mozilla/oghliner","forks_url":"https://api.github.com/repos/mozilla/oghliner/forks","keys_url":"https://api.github.com/repos/mozilla/oghliner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/oghliner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/oghliner/teams","hooks_url":"https://api.github.com/repos/mozilla/oghliner/hooks","issue_events_url":"https://api.github.com/repos/mozilla/oghliner/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/oghliner/events","assignees_url":"https://api.github.com/repos/mozilla/oghliner/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/oghliner/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/oghliner/tags","blobs_url":"https://api.github.com/repos/mozilla/oghliner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/oghliner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/oghliner/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/oghliner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/oghliner/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/oghliner/languages","stargazers_url":"https://api.github.com/repos/mozilla/oghliner/stargazers","contributors_url":"https://api.github.com/repos/mozilla/oghliner/contributors","subscribers_url":"https://api.github.com/repos/mozilla/oghliner/subscribers","subscription_url":"https://api.github.com/repos/mozilla/oghliner/subscription","commits_url":"https://api.github.com/repos/mozilla/oghliner/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/oghliner/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/oghliner/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/oghliner/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/oghliner/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/oghliner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/oghliner/merges","archive_url":"https://api.github.com/repos/mozilla/oghliner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/oghliner/downloads","issues_url":"https://api.github.com/repos/mozilla/oghliner/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/oghliner/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/oghliner/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/oghliner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/oghliner/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/oghliner/releases{/id}","created_at":"2015-09-09T14:42:56Z","updated_at":"2016-01-06T16:00:28Z","pushed_at":"2016-01-07T14:02:42Z","git_url":"git://github.com/mozilla/oghliner.git","ssh_url":"git@github.com:mozilla/oghliner.git","clone_url":"https://github.com/mozilla/oghliner.git","svn_url":"https://github.com/mozilla/oghliner","homepage":"https://mozilla.github.io/oghliner/","size":692,"stargazers_count":67,"watchers_count":67,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":32,"forks":11,"open_issues":32,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/oghliner/pulls/254"},"html":{"href":"https://github.com/mozilla/oghliner/pull/254"},"issue":{"href":"https://api.github.com/repos/mozilla/oghliner/issues/254"},"comments":{"href":"https://api.github.com/repos/mozilla/oghliner/issues/254/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/oghliner/pulls/254/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/oghliner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/oghliner/pulls/254/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/oghliner/statuses/0a6c52694f8a724eeedb76c6f0cf5c37a877ad7a"}}}}