{"action":"created","comment":{"url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/comments/31403322","id":31403322,"diff_hunk":"@@ -1,93 +1,113 @@\n //TODO move all variable declaration to the tops of functions.\n $(function() {\n-  $(\".pending-submission, .work\").each(function(index,element) {\n-    var elem = $(element);\n-\n-    var language = elem.data('language');\n-    $(\".language\",elem).tooltip({ title: language });\n-\n-    var nitCount = elem.data('nits');\n-    $(\".nits\",elem).tooltip({ title: nitCount + \" Nits by Others\" });\n-\n-    var versionCount = elem.data('versions');\n-    $(\".versions\",elem).tooltip({ title: \"Iteration \" + versionCount });\n-  });\n-\n-  $(\".code a[data-action='enlarge']\").on(\"click\",function() {\n-    var codeDiv = $(this).parents(\".code\");\n-    codeDiv.removeClass($(this).data(\"old-class\"));\n-    codeDiv.addClass($(this).data(\"new-class\"));\n-    $(this).hide();\n-    $(\"a[data-action='shrink']\",codeDiv).show();\n-  });\n-\n-  $(\".code a[data-action='shrink']\").on(\"click\",function() {\n-    var codeDiv = $(this).parents(\".code\");\n-    codeDiv.removeClass($(this).data(\"old-class\"));\n-    codeDiv.addClass($(this).data(\"new-class\"));\n-    $(this).hide();\n-    $(\"a[data-action='enlarge']\",codeDiv).show();\n-  });\n-\n-  $('form').on('submit', function() {\n-    var $this = $(this).find(':submit');\n-    window.setTimeout(function() { $this.attr('disabled', true); }, 1);\n-  });\n-\n-  $(\"form\").submit(function() {\n-    $(this).submit(function() {\n-      return false;\n+\n+    $(window).on(\"scroll\", function(){\n+        $(\"header .navbar\").toggleClass(\"scrolled\", window.scrollY > 0);\n+    });\n+\n+    $(\".pending-submission, .work\").each(function(index, element) {\n+        var elem = $(element);\n+\n+        var language = elem.data('language');\n+        $(\".language\", elem).tooltip({\n+            title: language\n+        });\n+\n+        var nitCount = elem.data('nits');\n+        $(\".nits\", elem).tooltip({\n+            title: nitCount + \" Nits by Others\"\n+        });\n+\n+        var versionCount = elem.data('versions');\n+        $(\".versions\", elem).tooltip({\n+            title: \"Iteration \" + versionCount\n+        });\n     });\n-  });\n \n+    $(\".code a[data-action='enlarge']\").on(\"click\", function() {\n+        var codeDiv = $(this).parents(\".code\");\n+        codeDiv.removeClass($(this).data(\"old-class\"));\n+        codeDiv.addClass($(this).data(\"new-class\"));\n+        $(this).hide();\n+        $(\"a[data-action='shrink']\", codeDiv).show();\n+    });\n+\n+    $(\".code a[data-action='shrink']\").on(\"click\", function() {\n+        var codeDiv = $(this).parents(\".code\");\n+        codeDiv.removeClass($(this).data(\"old-class\"));\n+        codeDiv.addClass($(this).data(\"new-class\"));\n+        $(this).hide();\n+        $(\"a[data-action='enlarge']\", codeDiv).show();\n+    });\n \n-  $('textarea').each(function () {\n-    var $this = $(this);\n-    var question_text = \"You have unsaved changes on this page\";\n-    var was_sumbitted = false;\n-    $this.parents(\"form\").on('submit',function(){\n-      was_sumbitted = true;\n+    $('form').on('submit', function() {\n+        var $this = $(this).find(':submit');\n+        window.setTimeout(function() {\n+            $this.attr('disabled', true);\n+        }, 1);\n     });\n-    window.onbeforeunload = function (e) {\n-      var unsaved = $this.text() !== $this.val();\n-      if(!was_sumbitted && unsaved) {\n-        // see http://stackoverflow.com/questions/10311341/confirmation-before-closing-of-tab-browser\n-        e = e || window.event;\n-\n-        if (e) {\n-            e.returnValue = question_text;\n+\n+    $(\"form\").submit(function() {\n+        $(this).submit(function() {\n+            return false;\n+        });\n+    });\n+\n+\n+    $('textarea').each(function() {\n+        var $this = $(this);\n+        var question_text = \"You have unsaved changes on this page\";","path":"frontend/app/js/script.js","position":111,"original_position":111,"commit_id":"bf1efdd5c122e18fefde2b093131219f288a2988","original_commit_id":"bf1efdd5c122e18fefde2b093131219f288a2988","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Identifier 'question_text' is not in camel case.","created_at":"2015-06-01T06:55:23Z","updated_at":"2015-06-01T06:55:23Z","html_url":"https://github.com/hanumakanthvvn/exercism.io/pull/49#discussion_r31403322","pull_request_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/comments/31403322"},"html":{"href":"https://github.com/hanumakanthvvn/exercism.io/pull/49#discussion_r31403322"},"pull_request":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/49","id":36602992,"html_url":"https://github.com/hanumakanthvvn/exercism.io/pull/49","diff_url":"https://github.com/hanumakanthvvn/exercism.io/pull/49.diff","patch_url":"https://github.com/hanumakanthvvn/exercism.io/pull/49.patch","issue_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/49","number":49,"state":"open","locked":false,"title":"updated favicon, header, footer and the front-page graphic adjustments","user":{"login":"praveenpuglia","id":313363,"avatar_url":"https://avatars.githubusercontent.com/u/313363?v=3","gravatar_id":"","url":"https://api.github.com/users/praveenpuglia","html_url":"https://github.com/praveenpuglia","followers_url":"https://api.github.com/users/praveenpuglia/followers","following_url":"https://api.github.com/users/praveenpuglia/following{/other_user}","gists_url":"https://api.github.com/users/praveenpuglia/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenpuglia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenpuglia/subscriptions","organizations_url":"https://api.github.com/users/praveenpuglia/orgs","repos_url":"https://api.github.com/users/praveenpuglia/repos","events_url":"https://api.github.com/users/praveenpuglia/events{/privacy}","received_events_url":"https://api.github.com/users/praveenpuglia/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-01T06:55:17Z","updated_at":"2015-06-01T06:55:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88135185354a799ca1475b45509b318a3abe7d28","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/49/commits","review_comments_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/49/comments","review_comment_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/49/comments","statuses_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/statuses/bf1efdd5c122e18fefde2b093131219f288a2988","head":{"label":"praveenpuglia:ui-fixes","ref":"ui-fixes","sha":"bf1efdd5c122e18fefde2b093131219f288a2988","user":{"login":"praveenpuglia","id":313363,"avatar_url":"https://avatars.githubusercontent.com/u/313363?v=3","gravatar_id":"","url":"https://api.github.com/users/praveenpuglia","html_url":"https://github.com/praveenpuglia","followers_url":"https://api.github.com/users/praveenpuglia/followers","following_url":"https://api.github.com/users/praveenpuglia/following{/other_user}","gists_url":"https://api.github.com/users/praveenpuglia/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenpuglia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenpuglia/subscriptions","organizations_url":"https://api.github.com/users/praveenpuglia/orgs","repos_url":"https://api.github.com/users/praveenpuglia/repos","events_url":"https://api.github.com/users/praveenpuglia/events{/privacy}","received_events_url":"https://api.github.com/users/praveenpuglia/received_events","type":"User","site_admin":false},"repo":{"id":35151594,"name":"exercism.io","full_name":"praveenpuglia/exercism.io","owner":{"login":"praveenpuglia","id":313363,"avatar_url":"https://avatars.githubusercontent.com/u/313363?v=3","gravatar_id":"","url":"https://api.github.com/users/praveenpuglia","html_url":"https://github.com/praveenpuglia","followers_url":"https://api.github.com/users/praveenpuglia/followers","following_url":"https://api.github.com/users/praveenpuglia/following{/other_user}","gists_url":"https://api.github.com/users/praveenpuglia/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenpuglia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenpuglia/subscriptions","organizations_url":"https://api.github.com/users/praveenpuglia/orgs","repos_url":"https://api.github.com/users/praveenpuglia/repos","events_url":"https://api.github.com/users/praveenpuglia/events{/privacy}","received_events_url":"https://api.github.com/users/praveenpuglia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/praveenpuglia/exercism.io","description":"Crowd-sourced mentorship.","fork":true,"url":"https://api.github.com/repos/praveenpuglia/exercism.io","forks_url":"https://api.github.com/repos/praveenpuglia/exercism.io/forks","keys_url":"https://api.github.com/repos/praveenpuglia/exercism.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praveenpuglia/exercism.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praveenpuglia/exercism.io/teams","hooks_url":"https://api.github.com/repos/praveenpuglia/exercism.io/hooks","issue_events_url":"https://api.github.com/repos/praveenpuglia/exercism.io/issues/events{/number}","events_url":"https://api.github.com/repos/praveenpuglia/exercism.io/events","assignees_url":"https://api.github.com/repos/praveenpuglia/exercism.io/assignees{/user}","branches_url":"https://api.github.com/repos/praveenpuglia/exercism.io/branches{/branch}","tags_url":"https://api.github.com/repos/praveenpuglia/exercism.io/tags","blobs_url":"https://api.github.com/repos/praveenpuglia/exercism.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praveenpuglia/exercism.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praveenpuglia/exercism.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/praveenpuglia/exercism.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praveenpuglia/exercism.io/statuses/{sha}","languages_url":"https://api.github.com/repos/praveenpuglia/exercism.io/languages","stargazers_url":"https://api.github.com/repos/praveenpuglia/exercism.io/stargazers","contributors_url":"https://api.github.com/repos/praveenpuglia/exercism.io/contributors","subscribers_url":"https://api.github.com/repos/praveenpuglia/exercism.io/subscribers","subscription_url":"https://api.github.com/repos/praveenpuglia/exercism.io/subscription","commits_url":"https://api.github.com/repos/praveenpuglia/exercism.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/praveenpuglia/exercism.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/praveenpuglia/exercism.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/praveenpuglia/exercism.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/praveenpuglia/exercism.io/contents/{+path}","compare_url":"https://api.github.com/repos/praveenpuglia/exercism.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praveenpuglia/exercism.io/merges","archive_url":"https://api.github.com/repos/praveenpuglia/exercism.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praveenpuglia/exercism.io/downloads","issues_url":"https://api.github.com/repos/praveenpuglia/exercism.io/issues{/number}","pulls_url":"https://api.github.com/repos/praveenpuglia/exercism.io/pulls{/number}","milestones_url":"https://api.github.com/repos/praveenpuglia/exercism.io/milestones{/number}","notifications_url":"https://api.github.com/repos/praveenpuglia/exercism.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praveenpuglia/exercism.io/labels{/name}","releases_url":"https://api.github.com/repos/praveenpuglia/exercism.io/releases{/id}","created_at":"2015-05-06T09:43:07Z","updated_at":"2015-05-25T05:18:46Z","pushed_at":"2015-05-29T10:08:13Z","git_url":"git://github.com/praveenpuglia/exercism.io.git","ssh_url":"git@github.com:praveenpuglia/exercism.io.git","clone_url":"https://github.com/praveenpuglia/exercism.io.git","svn_url":"https://github.com/praveenpuglia/exercism.io","homepage":"http://exercism.io","size":17797,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"hanumakanthvvn:master","ref":"master","sha":"f355b39b8854de8bd2e8a9b36ccc1d3e71abcb77","user":{"login":"hanumakanthvvn","id":219658,"avatar_url":"https://avatars.githubusercontent.com/u/219658?v=3","gravatar_id":"","url":"https://api.github.com/users/hanumakanthvvn","html_url":"https://github.com/hanumakanthvvn","followers_url":"https://api.github.com/users/hanumakanthvvn/followers","following_url":"https://api.github.com/users/hanumakanthvvn/following{/other_user}","gists_url":"https://api.github.com/users/hanumakanthvvn/gists{/gist_id}","starred_url":"https://api.github.com/users/hanumakanthvvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanumakanthvvn/subscriptions","organizations_url":"https://api.github.com/users/hanumakanthvvn/orgs","repos_url":"https://api.github.com/users/hanumakanthvvn/repos","events_url":"https://api.github.com/users/hanumakanthvvn/events{/privacy}","received_events_url":"https://api.github.com/users/hanumakanthvvn/received_events","type":"User","site_admin":false},"repo":{"id":27079261,"name":"exercism.io","full_name":"hanumakanthvvn/exercism.io","owner":{"login":"hanumakanthvvn","id":219658,"avatar_url":"https://avatars.githubusercontent.com/u/219658?v=3","gravatar_id":"","url":"https://api.github.com/users/hanumakanthvvn","html_url":"https://github.com/hanumakanthvvn","followers_url":"https://api.github.com/users/hanumakanthvvn/followers","following_url":"https://api.github.com/users/hanumakanthvvn/following{/other_user}","gists_url":"https://api.github.com/users/hanumakanthvvn/gists{/gist_id}","starred_url":"https://api.github.com/users/hanumakanthvvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanumakanthvvn/subscriptions","organizations_url":"https://api.github.com/users/hanumakanthvvn/orgs","repos_url":"https://api.github.com/users/hanumakanthvvn/repos","events_url":"https://api.github.com/users/hanumakanthvvn/events{/privacy}","received_events_url":"https://api.github.com/users/hanumakanthvvn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hanumakanthvvn/exercism.io","description":"Crowd-sourced mentorship.","fork":true,"url":"https://api.github.com/repos/hanumakanthvvn/exercism.io","forks_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/forks","keys_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/teams","hooks_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/hooks","issue_events_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/events{/number}","events_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/events","assignees_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/assignees{/user}","branches_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/branches{/branch}","tags_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/tags","blobs_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/statuses/{sha}","languages_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/languages","stargazers_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/stargazers","contributors_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/contributors","subscribers_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/subscribers","subscription_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/subscription","commits_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/contents/{+path}","compare_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/merges","archive_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/downloads","issues_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues{/number}","pulls_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls{/number}","milestones_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/milestones{/number}","notifications_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/labels{/name}","releases_url":"https://api.github.com/repos/hanumakanthvvn/exercism.io/releases{/id}","created_at":"2014-11-24T14:32:34Z","updated_at":"2015-05-22T10:19:56Z","pushed_at":"2015-06-01T06:55:18Z","git_url":"git://github.com/hanumakanthvvn/exercism.io.git","ssh_url":"git@github.com:hanumakanthvvn/exercism.io.git","clone_url":"https://github.com/hanumakanthvvn/exercism.io.git","svn_url":"https://github.com/hanumakanthvvn/exercism.io","homepage":"http://exercism.io","size":19454,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/49"},"html":{"href":"https://github.com/hanumakanthvvn/exercism.io/pull/49"},"issue":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/49"},"comments":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/hanumakanthvvn/exercism.io/statuses/bf1efdd5c122e18fefde2b093131219f288a2988"}}}}