{"action":"created","comment":{"url":"https://api.github.com/repos/thelounge/lounge/pulls/comments/157363397","pull_request_review_id":83995644,"id":157363397,"diff_hunk":"@@ -0,0 +1,62 @@\n+/* eslint strict: 0 */\n+\"use strict\";\n+\n+/*\n+ * This is a separate file for two reasons:\n+ * 1. CSP policy does not allow inline javascript\n+ * 2. It has to be a small javascript executed before all other scripts,\n+ *    so that the timeout can be triggered while slow JS is loading\n+ */\n+\n+(function() {\n+\tvar displayReload = function displayReload() {\n+\t\tvar loadingReload = document.getElementById(\"loading-reload\");\n+\t\tif (loadingReload) {\n+\t\t\tloadingReload.style.display = \"block\";\n+\t\t}\n+\t};\n+\n+\tvar loadingSlowTimeout = setTimeout(function() {\n+\t\tvar loadingSlow = document.getElementById(\"loading-slow\");\n+\n+\t\tif (loadingSlow) {\n+\t\t\tloadingSlow.style.display = \"block\";\n+\t\t}\n+\n+\t\tdisplayReload();","path":"client/js/loading-error-handlers.js","position":26,"original_position":26,"commit_id":"c70cc2fed7b6ea7e7c0f49a487f1c54b36fd2068","original_commit_id":"c70cc2fed7b6ea7e7c0f49a487f1c54b36fd2068","user":{"login":"xPaw","id":613331,"avatar_url":"https://avatars3.githubusercontent.com/u/613331?v=4","gravatar_id":"","url":"https://api.github.com/users/xPaw","html_url":"https://github.com/xPaw","followers_url":"https://api.github.com/users/xPaw/followers","following_url":"https://api.github.com/users/xPaw/following{/other_user}","gists_url":"https://api.github.com/users/xPaw/gists{/gist_id}","starred_url":"https://api.github.com/users/xPaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xPaw/subscriptions","organizations_url":"https://api.github.com/users/xPaw/orgs","repos_url":"https://api.github.com/users/xPaw/repos","events_url":"https://api.github.com/users/xPaw/events{/privacy}","received_events_url":"https://api.github.com/users/xPaw/received_events","type":"User","site_admin":false},"body":"You can move this inside the `if` above, if there is no slow message, there won't be a reload button anyway.","created_at":"2017-12-17T09:43:37Z","updated_at":"2017-12-17T09:43:37Z","html_url":"https://github.com/thelounge/lounge/pull/1845#discussion_r157363397","pull_request_url":"https://api.github.com/repos/thelounge/lounge/pulls/1845","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/comments/157363397"},"html":{"href":"https://github.com/thelounge/lounge/pull/1845#discussion_r157363397"},"pull_request":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/1845"}}},"pull_request":{"url":"https://api.github.com/repos/thelounge/lounge/pulls/1845","id":158760897,"html_url":"https://github.com/thelounge/lounge/pull/1845","diff_url":"https://github.com/thelounge/lounge/pull/1845.diff","patch_url":"https://github.com/thelounge/lounge/pull/1845.patch","issue_url":"https://api.github.com/repos/thelounge/lounge/issues/1845","number":1845,"state":"open","locked":false,"title":"Improve error page at loading time","user":{"login":"astorije","id":113730,"avatar_url":"https://avatars1.githubusercontent.com/u/113730?v=4","gravatar_id":"","url":"https://api.github.com/users/astorije","html_url":"https://github.com/astorije","followers_url":"https://api.github.com/users/astorije/followers","following_url":"https://api.github.com/users/astorije/following{/other_user}","gists_url":"https://api.github.com/users/astorije/gists{/gist_id}","starred_url":"https://api.github.com/users/astorije/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astorije/subscriptions","organizations_url":"https://api.github.com/users/astorije/orgs","repos_url":"https://api.github.com/users/astorije/repos","events_url":"https://api.github.com/users/astorije/events{/privacy}","received_events_url":"https://api.github.com/users/astorije/received_events","type":"User","site_admin":false},"body":"- Display the \"Reload page\" instantly and not after 5 seconds\r\n- Fix missing stack trace\r\n- Wrap the stack trace so it does not expand beyond boundaries (scrollbar would not show up either)\r\n- Do not show the slow-loading warning on error\r\n- Make stack trace selectable instead of editable\r\n- Label improvements\r\n\r\nBefore | After\r\n--- | ---\r\n<b>On load:</b><br><img width=\"431\" alt=\"screen shot 2017-12-16 at 16 16 43\" src=\"https://user-images.githubusercontent.com/113730/34074438-0f1c1bc0-e27d-11e7-896e-061986d88ead.png\"><br><b>After 5 seconds:</b><br><img width=\"453\" alt=\"screen shot 2017-12-16 at 16 16 47\" src=\"https://user-images.githubusercontent.com/113730/34074441-16e1ead8-e27d-11e7-9118-7e0fab71808a.png\"> | <img width=\"429\" alt=\"screen shot 2017-12-16 at 16 17 14\" src=\"https://user-images.githubusercontent.com/113730/34074445-284d47c2-e27d-11e7-94dc-fea295891ce4.png\">\r\n<img width=\"495\" alt=\"screen shot 2017-12-16 at 16 16 57\" src=\"https://user-images.githubusercontent.com/113730/34074442-1f112e26-e27d-11e7-88cd-e46a5859dc59.png\"> | <img width=\"475\" alt=\"screen shot 2017-12-16 at 16 17 20\" src=\"https://user-images.githubusercontent.com/113730/34074447-2cb2710c-e27d-11e7-88d1-7be3d2c1795a.png\">","created_at":"2017-12-16T21:22:56Z","updated_at":"2017-12-17T09:43:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"079f2f513b4cb58a5ac3bed4b4856e39b493954c","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/thelounge/lounge/pulls/1845/commits","review_comments_url":"https://api.github.com/repos/thelounge/lounge/pulls/1845/comments","review_comment_url":"https://api.github.com/repos/thelounge/lounge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thelounge/lounge/issues/1845/comments","statuses_url":"https://api.github.com/repos/thelounge/lounge/statuses/c70cc2fed7b6ea7e7c0f49a487f1c54b36fd2068","head":{"label":"thelounge:astorije/error-loading","ref":"astorije/error-loading","sha":"c70cc2fed7b6ea7e7c0f49a487f1c54b36fd2068","user":{"login":"thelounge","id":14336958,"avatar_url":"https://avatars1.githubusercontent.com/u/14336958?v=4","gravatar_id":"","url":"https://api.github.com/users/thelounge","html_url":"https://github.com/thelounge","followers_url":"https://api.github.com/users/thelounge/followers","following_url":"https://api.github.com/users/thelounge/following{/other_user}","gists_url":"https://api.github.com/users/thelounge/gists{/gist_id}","starred_url":"https://api.github.com/users/thelounge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelounge/subscriptions","organizations_url":"https://api.github.com/users/thelounge/orgs","repos_url":"https://api.github.com/users/thelounge/repos","events_url":"https://api.github.com/users/thelounge/events{/privacy}","received_events_url":"https://api.github.com/users/thelounge/received_events","type":"Organization","site_admin":false},"repo":{"id":51344082,"name":"lounge","full_name":"thelounge/lounge","owner":{"login":"thelounge","id":14336958,"avatar_url":"https://avatars1.githubusercontent.com/u/14336958?v=4","gravatar_id":"","url":"https://api.github.com/users/thelounge","html_url":"https://github.com/thelounge","followers_url":"https://api.github.com/users/thelounge/followers","following_url":"https://api.github.com/users/thelounge/following{/other_user}","gists_url":"https://api.github.com/users/thelounge/gists{/gist_id}","starred_url":"https://api.github.com/users/thelounge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelounge/subscriptions","organizations_url":"https://api.github.com/users/thelounge/orgs","repos_url":"https://api.github.com/users/thelounge/repos","events_url":"https://api.github.com/users/thelounge/events{/privacy}","received_events_url":"https://api.github.com/users/thelounge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thelounge/lounge","description":"💬 The Lounge — Modern self-hosted web IRC client","fork":false,"url":"https://api.github.com/repos/thelounge/lounge","forks_url":"https://api.github.com/repos/thelounge/lounge/forks","keys_url":"https://api.github.com/repos/thelounge/lounge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thelounge/lounge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thelounge/lounge/teams","hooks_url":"https://api.github.com/repos/thelounge/lounge/hooks","issue_events_url":"https://api.github.com/repos/thelounge/lounge/issues/events{/number}","events_url":"https://api.github.com/repos/thelounge/lounge/events","assignees_url":"https://api.github.com/repos/thelounge/lounge/assignees{/user}","branches_url":"https://api.github.com/repos/thelounge/lounge/branches{/branch}","tags_url":"https://api.github.com/repos/thelounge/lounge/tags","blobs_url":"https://api.github.com/repos/thelounge/lounge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thelounge/lounge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thelounge/lounge/git/refs{/sha}","trees_url":"https://api.github.com/repos/thelounge/lounge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thelounge/lounge/statuses/{sha}","languages_url":"https://api.github.com/repos/thelounge/lounge/languages","stargazers_url":"https://api.github.com/repos/thelounge/lounge/stargazers","contributors_url":"https://api.github.com/repos/thelounge/lounge/contributors","subscribers_url":"https://api.github.com/repos/thelounge/lounge/subscribers","subscription_url":"https://api.github.com/repos/thelounge/lounge/subscription","commits_url":"https://api.github.com/repos/thelounge/lounge/commits{/sha}","git_commits_url":"https://api.github.com/repos/thelounge/lounge/git/commits{/sha}","comments_url":"https://api.github.com/repos/thelounge/lounge/comments{/number}","issue_comment_url":"https://api.github.com/repos/thelounge/lounge/issues/comments{/number}","contents_url":"https://api.github.com/repos/thelounge/lounge/contents/{+path}","compare_url":"https://api.github.com/repos/thelounge/lounge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thelounge/lounge/merges","archive_url":"https://api.github.com/repos/thelounge/lounge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thelounge/lounge/downloads","issues_url":"https://api.github.com/repos/thelounge/lounge/issues{/number}","pulls_url":"https://api.github.com/repos/thelounge/lounge/pulls{/number}","milestones_url":"https://api.github.com/repos/thelounge/lounge/milestones{/number}","notifications_url":"https://api.github.com/repos/thelounge/lounge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thelounge/lounge/labels{/name}","releases_url":"https://api.github.com/repos/thelounge/lounge/releases{/id}","deployments_url":"https://api.github.com/repos/thelounge/lounge/deployments","created_at":"2016-02-09T03:16:03Z","updated_at":"2017-12-17T08:07:27Z","pushed_at":"2017-12-17T06:20:41Z","git_url":"git://github.com/thelounge/lounge.git","ssh_url":"git@github.com:thelounge/lounge.git","clone_url":"https://github.com/thelounge/lounge.git","svn_url":"https://github.com/thelounge/lounge","homepage":"https://thelounge.github.io","size":10941,"stargazers_count":1507,"watchers_count":1507,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":252,"mirror_url":null,"archived":false,"open_issues_count":203,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":252,"open_issues":203,"watchers":1507,"default_branch":"master"}},"base":{"label":"thelounge:master","ref":"master","sha":"bf602db9914e57319ae7ce33a56dd6755623e70f","user":{"login":"thelounge","id":14336958,"avatar_url":"https://avatars1.githubusercontent.com/u/14336958?v=4","gravatar_id":"","url":"https://api.github.com/users/thelounge","html_url":"https://github.com/thelounge","followers_url":"https://api.github.com/users/thelounge/followers","following_url":"https://api.github.com/users/thelounge/following{/other_user}","gists_url":"https://api.github.com/users/thelounge/gists{/gist_id}","starred_url":"https://api.github.com/users/thelounge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelounge/subscriptions","organizations_url":"https://api.github.com/users/thelounge/orgs","repos_url":"https://api.github.com/users/thelounge/repos","events_url":"https://api.github.com/users/thelounge/events{/privacy}","received_events_url":"https://api.github.com/users/thelounge/received_events","type":"Organization","site_admin":false},"repo":{"id":51344082,"name":"lounge","full_name":"thelounge/lounge","owner":{"login":"thelounge","id":14336958,"avatar_url":"https://avatars1.githubusercontent.com/u/14336958?v=4","gravatar_id":"","url":"https://api.github.com/users/thelounge","html_url":"https://github.com/thelounge","followers_url":"https://api.github.com/users/thelounge/followers","following_url":"https://api.github.com/users/thelounge/following{/other_user}","gists_url":"https://api.github.com/users/thelounge/gists{/gist_id}","starred_url":"https://api.github.com/users/thelounge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelounge/subscriptions","organizations_url":"https://api.github.com/users/thelounge/orgs","repos_url":"https://api.github.com/users/thelounge/repos","events_url":"https://api.github.com/users/thelounge/events{/privacy}","received_events_url":"https://api.github.com/users/thelounge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thelounge/lounge","description":"💬 The Lounge — Modern self-hosted web IRC client","fork":false,"url":"https://api.github.com/repos/thelounge/lounge","forks_url":"https://api.github.com/repos/thelounge/lounge/forks","keys_url":"https://api.github.com/repos/thelounge/lounge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thelounge/lounge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thelounge/lounge/teams","hooks_url":"https://api.github.com/repos/thelounge/lounge/hooks","issue_events_url":"https://api.github.com/repos/thelounge/lounge/issues/events{/number}","events_url":"https://api.github.com/repos/thelounge/lounge/events","assignees_url":"https://api.github.com/repos/thelounge/lounge/assignees{/user}","branches_url":"https://api.github.com/repos/thelounge/lounge/branches{/branch}","tags_url":"https://api.github.com/repos/thelounge/lounge/tags","blobs_url":"https://api.github.com/repos/thelounge/lounge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thelounge/lounge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thelounge/lounge/git/refs{/sha}","trees_url":"https://api.github.com/repos/thelounge/lounge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thelounge/lounge/statuses/{sha}","languages_url":"https://api.github.com/repos/thelounge/lounge/languages","stargazers_url":"https://api.github.com/repos/thelounge/lounge/stargazers","contributors_url":"https://api.github.com/repos/thelounge/lounge/contributors","subscribers_url":"https://api.github.com/repos/thelounge/lounge/subscribers","subscription_url":"https://api.github.com/repos/thelounge/lounge/subscription","commits_url":"https://api.github.com/repos/thelounge/lounge/commits{/sha}","git_commits_url":"https://api.github.com/repos/thelounge/lounge/git/commits{/sha}","comments_url":"https://api.github.com/repos/thelounge/lounge/comments{/number}","issue_comment_url":"https://api.github.com/repos/thelounge/lounge/issues/comments{/number}","contents_url":"https://api.github.com/repos/thelounge/lounge/contents/{+path}","compare_url":"https://api.github.com/repos/thelounge/lounge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thelounge/lounge/merges","archive_url":"https://api.github.com/repos/thelounge/lounge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thelounge/lounge/downloads","issues_url":"https://api.github.com/repos/thelounge/lounge/issues{/number}","pulls_url":"https://api.github.com/repos/thelounge/lounge/pulls{/number}","milestones_url":"https://api.github.com/repos/thelounge/lounge/milestones{/number}","notifications_url":"https://api.github.com/repos/thelounge/lounge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thelounge/lounge/labels{/name}","releases_url":"https://api.github.com/repos/thelounge/lounge/releases{/id}","deployments_url":"https://api.github.com/repos/thelounge/lounge/deployments","created_at":"2016-02-09T03:16:03Z","updated_at":"2017-12-17T08:07:27Z","pushed_at":"2017-12-17T06:20:41Z","git_url":"git://github.com/thelounge/lounge.git","ssh_url":"git@github.com:thelounge/lounge.git","clone_url":"https://github.com/thelounge/lounge.git","svn_url":"https://github.com/thelounge/lounge","homepage":"https://thelounge.github.io","size":10941,"stargazers_count":1507,"watchers_count":1507,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":252,"mirror_url":null,"archived":false,"open_issues_count":203,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":252,"open_issues":203,"watchers":1507,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/1845"},"html":{"href":"https://github.com/thelounge/lounge/pull/1845"},"issue":{"href":"https://api.github.com/repos/thelounge/lounge/issues/1845"},"comments":{"href":"https://api.github.com/repos/thelounge/lounge/issues/1845/comments"},"review_comments":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/1845/comments"},"review_comment":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thelounge/lounge/pulls/1845/commits"},"statuses":{"href":"https://api.github.com/repos/thelounge/lounge/statuses/c70cc2fed7b6ea7e7c0f49a487f1c54b36fd2068"}},"author_association":"OWNER"}}
{"actor":{"display_login":"xPaw"}}