{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/25959724","id":25959724,"diff_hunk":"@@ -16,9 +16,11 @@ var NavbarViewModel = function() {\n     self.showClose = true;\n \n     self.onSearchPage = ko.computed(function() {\n-        var path = window.location.pathname;\n-        var indexOfSearch = path.indexOf('search');\n-        return indexOfSearch === 1;\n+        if (window.contextVars.search){","path":"website/static/js/navbarControl.js","position":null,"original_position":7,"commit_id":"44d4d97b69150878d81d4998d37a52ad9e7de5a9","original_commit_id":"16dbd415ab6ffda4210d6fcb7bc49139f487ffeb","user":{"login":"chennan47","id":4974056,"avatar_url":"https://avatars.githubusercontent.com/u/4974056?v=3","gravatar_id":"","url":"https://api.github.com/users/chennan47","html_url":"https://github.com/chennan47","followers_url":"https://api.github.com/users/chennan47/followers","following_url":"https://api.github.com/users/chennan47/following{/other_user}","gists_url":"https://api.github.com/users/chennan47/gists{/gist_id}","starred_url":"https://api.github.com/users/chennan47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chennan47/subscriptions","organizations_url":"https://api.github.com/users/chennan47/orgs","repos_url":"https://api.github.com/users/chennan47/repos","events_url":"https://api.github.com/users/chennan47/events{/privacy}","received_events_url":"https://api.github.com/users/chennan47/received_events","type":"User","site_admin":false},"body":"resolved in 44d4d97","created_at":"2015-03-06T17:10:11Z","updated_at":"2015-03-06T17:10:11Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/1861#discussion_r25959724","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1861","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/25959724"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/1861#discussion_r25959724"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1861"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1861","id":29719772,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/1861","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/1861.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/1861.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1861","number":1861,"state":"open","locked":false,"title":"[hotfix]build a redirect routing for search","user":{"login":"chennan47","id":4974056,"avatar_url":"https://avatars.githubusercontent.com/u/4974056?v=3","gravatar_id":"","url":"https://api.github.com/users/chennan47","html_url":"https://github.com/chennan47","followers_url":"https://api.github.com/users/chennan47/followers","following_url":"https://api.github.com/users/chennan47/following{/other_user}","gists_url":"https://api.github.com/users/chennan47/gists{/gist_id}","starred_url":"https://api.github.com/users/chennan47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chennan47/subscriptions","organizations_url":"https://api.github.com/users/chennan47/orgs","repos_url":"https://api.github.com/users/chennan47/repos","events_url":"https://api.github.com/users/chennan47/events{/privacy}","received_events_url":"https://api.github.com/users/chennan47/received_events","type":"User","site_admin":false},"body":"<b>Purpose</b>\r\nResolve the problem that go to any non-existent route prefixed with osf.io/search and you get a 404 page, but there is no search bar at the top anymore. \r\n![image](https://cloud.githubusercontent.com/assets/4974056/6306931/946f11dc-b905-11e4-9456-b6b6a5f70883.png)\r\n\r\n<b>Changes</b>\r\nCreate a new routing for search which process any random string which prefixed by osf.io/search and make them the actual search input and redirect you to the search result page instead of a page 404.\r\n![screen shot 2015-02-20 at 1 41 39 pm](https://cloud.githubusercontent.com/assets/4974056/6307005/3c89cb3c-b906-11e4-94bd-75f39bc2beaf.png)\r\nwill redirect you to page\r\n![screen shot 2015-02-20 at 1 42 12 pm](https://cloud.githubusercontent.com/assets/4974056/6307014/4fde8556-b906-11e4-88d5-6c9d63ea10c9.png)\r\n\r\n\r\npartially resolves https://github.com/CenterForOpenScience/osf.io/issues/1795","created_at":"2015-02-20T18:42:50Z","updated_at":"2015-03-06T17:10:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f734d056fc70c8068669764ef6e3e0c39fd27ccd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1861/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1861/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1861/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/44d4d97b69150878d81d4998d37a52ad9e7de5a9","head":{"label":"chennan47:hotfix/404_page_search_bar","ref":"hotfix/404_page_search_bar","sha":"44d4d97b69150878d81d4998d37a52ad9e7de5a9","user":{"login":"chennan47","id":4974056,"avatar_url":"https://avatars.githubusercontent.com/u/4974056?v=3","gravatar_id":"","url":"https://api.github.com/users/chennan47","html_url":"https://github.com/chennan47","followers_url":"https://api.github.com/users/chennan47/followers","following_url":"https://api.github.com/users/chennan47/following{/other_user}","gists_url":"https://api.github.com/users/chennan47/gists{/gist_id}","starred_url":"https://api.github.com/users/chennan47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chennan47/subscriptions","organizations_url":"https://api.github.com/users/chennan47/orgs","repos_url":"https://api.github.com/users/chennan47/repos","events_url":"https://api.github.com/users/chennan47/events{/privacy}","received_events_url":"https://api.github.com/users/chennan47/received_events","type":"User","site_admin":false},"repo":{"id":26927567,"name":"osf.io","full_name":"chennan47/osf.io","owner":{"login":"chennan47","id":4974056,"avatar_url":"https://avatars.githubusercontent.com/u/4974056?v=3","gravatar_id":"","url":"https://api.github.com/users/chennan47","html_url":"https://github.com/chennan47","followers_url":"https://api.github.com/users/chennan47/followers","following_url":"https://api.github.com/users/chennan47/following{/other_user}","gists_url":"https://api.github.com/users/chennan47/gists{/gist_id}","starred_url":"https://api.github.com/users/chennan47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chennan47/subscriptions","organizations_url":"https://api.github.com/users/chennan47/orgs","repos_url":"https://api.github.com/users/chennan47/repos","events_url":"https://api.github.com/users/chennan47/events{/privacy}","received_events_url":"https://api.github.com/users/chennan47/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chennan47/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/chennan47/osf.io","forks_url":"https://api.github.com/repos/chennan47/osf.io/forks","keys_url":"https://api.github.com/repos/chennan47/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chennan47/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chennan47/osf.io/teams","hooks_url":"https://api.github.com/repos/chennan47/osf.io/hooks","issue_events_url":"https://api.github.com/repos/chennan47/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/chennan47/osf.io/events","assignees_url":"https://api.github.com/repos/chennan47/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/chennan47/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/chennan47/osf.io/tags","blobs_url":"https://api.github.com/repos/chennan47/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chennan47/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chennan47/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/chennan47/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chennan47/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/chennan47/osf.io/languages","stargazers_url":"https://api.github.com/repos/chennan47/osf.io/stargazers","contributors_url":"https://api.github.com/repos/chennan47/osf.io/contributors","subscribers_url":"https://api.github.com/repos/chennan47/osf.io/subscribers","subscription_url":"https://api.github.com/repos/chennan47/osf.io/subscription","commits_url":"https://api.github.com/repos/chennan47/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/chennan47/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/chennan47/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/chennan47/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/chennan47/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/chennan47/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chennan47/osf.io/merges","archive_url":"https://api.github.com/repos/chennan47/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chennan47/osf.io/downloads","issues_url":"https://api.github.com/repos/chennan47/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/chennan47/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/chennan47/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/chennan47/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chennan47/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/chennan47/osf.io/releases{/id}","created_at":"2014-11-20T19:12:43Z","updated_at":"2014-11-20T19:12:46Z","pushed_at":"2015-03-06T17:09:57Z","git_url":"git://github.com/chennan47/osf.io.git","ssh_url":"git@github.com:chennan47/osf.io.git","clone_url":"https://github.com/chennan47/osf.io.git","svn_url":"https://github.com/chennan47/osf.io","homepage":"http://osf.io","size":80437,"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":"develop"}},"base":{"label":"CenterForOpenScience:master","ref":"master","sha":"df889aa7398ffd3f35c9eb818f3e493bdc9bfb12","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","created_at":"2013-05-21T15:53:37Z","updated_at":"2015-03-06T17:08:59Z","pushed_at":"2015-03-06T17:08:59Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"http://osf.io","size":95281,"stargazers_count":77,"watchers_count":77,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":352,"forks":57,"open_issues":352,"watchers":77,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1861"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/1861"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1861"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1861/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1861/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1861/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/44d4d97b69150878d81d4998d37a52ad9e7de5a9"}}}}