{"action":"created","comment":{"url":"https://api.github.com/repos/ramda/repl/pulls/comments/82948608","pull_request_review_id":3819005,"id":82948608,"diff_hunk":"@@ -90,25 +69,89 @@\n \n     <script>\n \n-      document.querySelector('.ramda-repl-target').addEventListener('click', function(e) {\n+      (function() {\n \n-        ramdaRepl(e.target, {\n \n-          apiUrl: 'https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyDhbAvT5JqkxFPkoeezJp19-S_mAJudxyk',\n-          returnUrl: 'http://ramdajs.com/repl/',\n+        var ramdaUrl;\n \n-          // If unset, initialValue will use the value or textcontent of the\n-          // target element.\n-          initialValue: URI.decode(window.location.hash).substring(2),\n-\n-          // Called with the pre-compiled content\n-          onChange : function(code) {\n-            window.location.hash = '?' + URI.encode(code);\n+        var rx = /^\\d+\\.\\d+(\\.\\d+)?$/;\n+        var version = 'latest';\n+        location.search.substr(1).split('&').forEach(function(pair) {","path":"index.html","position":null,"original_position":50,"commit_id":"32f7316148f3b0e9f4a1360d19c5a0923eec3c75","original_commit_id":"6d316f2dcecf11a87d63ba242778da1ceb90bf46","user":{"login":"craigdallimore","id":926283,"avatar_url":"https://avatars.githubusercontent.com/u/926283?v=3","gravatar_id":"","url":"https://api.github.com/users/craigdallimore","html_url":"https://github.com/craigdallimore","followers_url":"https://api.github.com/users/craigdallimore/followers","following_url":"https://api.github.com/users/craigdallimore/following{/other_user}","gists_url":"https://api.github.com/users/craigdallimore/gists{/gist_id}","starred_url":"https://api.github.com/users/craigdallimore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigdallimore/subscriptions","organizations_url":"https://api.github.com/users/craigdallimore/orgs","repos_url":"https://api.github.com/users/craigdallimore/repos","events_url":"https://api.github.com/users/craigdallimore/events{/privacy}","received_events_url":"https://api.github.com/users/craigdallimore/received_events","type":"User","site_admin":false},"body":"Ok! [Here is an attempt using reduce] (https://github.com/ramda/repl/pull/25/commits/32f7316148f3b0e9f4a1360d19c5a0923eec3c75). :octopus:","created_at":"2016-10-12T07:22:45Z","updated_at":"2016-10-12T07:22:45Z","html_url":"https://github.com/ramda/repl/pull/25#discussion_r82948608","pull_request_url":"https://api.github.com/repos/ramda/repl/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/ramda/repl/pulls/comments/82948608"},"html":{"href":"https://github.com/ramda/repl/pull/25#discussion_r82948608"},"pull_request":{"href":"https://api.github.com/repos/ramda/repl/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/ramda/repl/pulls/25","id":88730690,"html_url":"https://github.com/ramda/repl/pull/25","diff_url":"https://github.com/ramda/repl/pull/25.diff","patch_url":"https://github.com/ramda/repl/pull/25.patch","issue_url":"https://api.github.com/repos/ramda/repl/issues/25","number":25,"state":"open","locked":false,"title":"Graceful script loading","user":{"login":"craigdallimore","id":926283,"avatar_url":"https://avatars.githubusercontent.com/u/926283?v=3","gravatar_id":"","url":"https://api.github.com/users/craigdallimore","html_url":"https://github.com/craigdallimore","followers_url":"https://api.github.com/users/craigdallimore/followers","following_url":"https://api.github.com/users/craigdallimore/following{/other_user}","gists_url":"https://api.github.com/users/craigdallimore/gists{/gist_id}","starred_url":"https://api.github.com/users/craigdallimore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigdallimore/subscriptions","organizations_url":"https://api.github.com/users/craigdallimore/orgs","repos_url":"https://api.github.com/users/craigdallimore/repos","events_url":"https://api.github.com/users/craigdallimore/events{/privacy}","received_events_url":"https://api.github.com/users/craigdallimore/received_events","type":"User","site_admin":false},"body":"Hello\r\n\r\nHere is an attempt at adding a bit more feedback / control over script loading. It's a bit cursory, I hope it might lead to things like enabling dynamically loaded external resources (dropdown with ramda versions, perhaps?). For now it might help with handling errors when loading external scripts.\r\n\r\nAt present this will enable us to define (with a bit of JSON) which scripts we would like to load and how they will be exposed on the `window` object. Upon instantiation, _repl_ will load the scripts - first `ramda`, then - given that succeeds - the rest of the scripts in parallel.\r\n\r\nWhile they load a spinner is presented, and upon a successful load the repl controls become enabled. If a script _fails_ to load the repl will not start, and a very basic error message is displayed. One way to test this is to give an incorrect `src` within the config.\r\n\r\nOf note: The repl will have `ramda` and `ramda-fantasy` baked in as part of its implementation. This is intended to trade a bit of extra downloading for the ability to load any version of ramda (and friends) without needing to be concerned how API movement might impact the repl code.\r\n\r\n### Spinner\r\n\r\n![spin](https://cloud.githubusercontent.com/assets/926283/19250949/d28cbfd0-8f34-11e6-9290-daafc4f2260c.png)\r\n\r\n### Failure feedback\r\n\r\n![fail-sanctuary](https://cloud.githubusercontent.com/assets/926283/19250955/d7b46b98-8f34-11e6-9c4a-66acfa80ee58.png)\r\n","created_at":"2016-10-10T21:02:52Z","updated_at":"2016-10-12T07:22:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"643d9d8450a8d7567e1eaff7ef070e49310ea0b1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ramda/repl/pulls/25/commits","review_comments_url":"https://api.github.com/repos/ramda/repl/pulls/25/comments","review_comment_url":"https://api.github.com/repos/ramda/repl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ramda/repl/issues/25/comments","statuses_url":"https://api.github.com/repos/ramda/repl/statuses/32f7316148f3b0e9f4a1360d19c5a0923eec3c75","head":{"label":"craigdallimore:graceful-script-loading","ref":"graceful-script-loading","sha":"32f7316148f3b0e9f4a1360d19c5a0923eec3c75","user":{"login":"craigdallimore","id":926283,"avatar_url":"https://avatars.githubusercontent.com/u/926283?v=3","gravatar_id":"","url":"https://api.github.com/users/craigdallimore","html_url":"https://github.com/craigdallimore","followers_url":"https://api.github.com/users/craigdallimore/followers","following_url":"https://api.github.com/users/craigdallimore/following{/other_user}","gists_url":"https://api.github.com/users/craigdallimore/gists{/gist_id}","starred_url":"https://api.github.com/users/craigdallimore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigdallimore/subscriptions","organizations_url":"https://api.github.com/users/craigdallimore/orgs","repos_url":"https://api.github.com/users/craigdallimore/repos","events_url":"https://api.github.com/users/craigdallimore/events{/privacy}","received_events_url":"https://api.github.com/users/craigdallimore/received_events","type":"User","site_admin":false},"repo":{"id":68179211,"name":"repl","full_name":"craigdallimore/repl","owner":{"login":"craigdallimore","id":926283,"avatar_url":"https://avatars.githubusercontent.com/u/926283?v=3","gravatar_id":"","url":"https://api.github.com/users/craigdallimore","html_url":"https://github.com/craigdallimore","followers_url":"https://api.github.com/users/craigdallimore/followers","following_url":"https://api.github.com/users/craigdallimore/following{/other_user}","gists_url":"https://api.github.com/users/craigdallimore/gists{/gist_id}","starred_url":"https://api.github.com/users/craigdallimore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigdallimore/subscriptions","organizations_url":"https://api.github.com/users/craigdallimore/orgs","repos_url":"https://api.github.com/users/craigdallimore/repos","events_url":"https://api.github.com/users/craigdallimore/events{/privacy}","received_events_url":"https://api.github.com/users/craigdallimore/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/craigdallimore/repl","description":"The Ramda REPL","fork":true,"url":"https://api.github.com/repos/craigdallimore/repl","forks_url":"https://api.github.com/repos/craigdallimore/repl/forks","keys_url":"https://api.github.com/repos/craigdallimore/repl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/craigdallimore/repl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/craigdallimore/repl/teams","hooks_url":"https://api.github.com/repos/craigdallimore/repl/hooks","issue_events_url":"https://api.github.com/repos/craigdallimore/repl/issues/events{/number}","events_url":"https://api.github.com/repos/craigdallimore/repl/events","assignees_url":"https://api.github.com/repos/craigdallimore/repl/assignees{/user}","branches_url":"https://api.github.com/repos/craigdallimore/repl/branches{/branch}","tags_url":"https://api.github.com/repos/craigdallimore/repl/tags","blobs_url":"https://api.github.com/repos/craigdallimore/repl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/craigdallimore/repl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/craigdallimore/repl/git/refs{/sha}","trees_url":"https://api.github.com/repos/craigdallimore/repl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/craigdallimore/repl/statuses/{sha}","languages_url":"https://api.github.com/repos/craigdallimore/repl/languages","stargazers_url":"https://api.github.com/repos/craigdallimore/repl/stargazers","contributors_url":"https://api.github.com/repos/craigdallimore/repl/contributors","subscribers_url":"https://api.github.com/repos/craigdallimore/repl/subscribers","subscription_url":"https://api.github.com/repos/craigdallimore/repl/subscription","commits_url":"https://api.github.com/repos/craigdallimore/repl/commits{/sha}","git_commits_url":"https://api.github.com/repos/craigdallimore/repl/git/commits{/sha}","comments_url":"https://api.github.com/repos/craigdallimore/repl/comments{/number}","issue_comment_url":"https://api.github.com/repos/craigdallimore/repl/issues/comments{/number}","contents_url":"https://api.github.com/repos/craigdallimore/repl/contents/{+path}","compare_url":"https://api.github.com/repos/craigdallimore/repl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/craigdallimore/repl/merges","archive_url":"https://api.github.com/repos/craigdallimore/repl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/craigdallimore/repl/downloads","issues_url":"https://api.github.com/repos/craigdallimore/repl/issues{/number}","pulls_url":"https://api.github.com/repos/craigdallimore/repl/pulls{/number}","milestones_url":"https://api.github.com/repos/craigdallimore/repl/milestones{/number}","notifications_url":"https://api.github.com/repos/craigdallimore/repl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/craigdallimore/repl/labels{/name}","releases_url":"https://api.github.com/repos/craigdallimore/repl/releases{/id}","deployments_url":"https://api.github.com/repos/craigdallimore/repl/deployments","created_at":"2016-09-14T06:22:45Z","updated_at":"2016-09-14T06:22:46Z","pushed_at":"2016-10-12T07:16:59Z","git_url":"git://github.com/craigdallimore/repl.git","ssh_url":"git@github.com:craigdallimore/repl.git","clone_url":"https://github.com/craigdallimore/repl.git","svn_url":"https://github.com/craigdallimore/repl","homepage":null,"size":1769,"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":"ramda:master","ref":"master","sha":"8b03b9bfd95decc31c42d88f050228df5d7fb8e3","user":{"login":"ramda","id":5298359,"avatar_url":"https://avatars.githubusercontent.com/u/5298359?v=3","gravatar_id":"","url":"https://api.github.com/users/ramda","html_url":"https://github.com/ramda","followers_url":"https://api.github.com/users/ramda/followers","following_url":"https://api.github.com/users/ramda/following{/other_user}","gists_url":"https://api.github.com/users/ramda/gists{/gist_id}","starred_url":"https://api.github.com/users/ramda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramda/subscriptions","organizations_url":"https://api.github.com/users/ramda/orgs","repos_url":"https://api.github.com/users/ramda/repos","events_url":"https://api.github.com/users/ramda/events{/privacy}","received_events_url":"https://api.github.com/users/ramda/received_events","type":"Organization","site_admin":false},"repo":{"id":68151770,"name":"repl","full_name":"ramda/repl","owner":{"login":"ramda","id":5298359,"avatar_url":"https://avatars.githubusercontent.com/u/5298359?v=3","gravatar_id":"","url":"https://api.github.com/users/ramda","html_url":"https://github.com/ramda","followers_url":"https://api.github.com/users/ramda/followers","following_url":"https://api.github.com/users/ramda/following{/other_user}","gists_url":"https://api.github.com/users/ramda/gists{/gist_id}","starred_url":"https://api.github.com/users/ramda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramda/subscriptions","organizations_url":"https://api.github.com/users/ramda/orgs","repos_url":"https://api.github.com/users/ramda/repos","events_url":"https://api.github.com/users/ramda/events{/privacy}","received_events_url":"https://api.github.com/users/ramda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ramda/repl","description":"The Ramda REPL","fork":false,"url":"https://api.github.com/repos/ramda/repl","forks_url":"https://api.github.com/repos/ramda/repl/forks","keys_url":"https://api.github.com/repos/ramda/repl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ramda/repl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ramda/repl/teams","hooks_url":"https://api.github.com/repos/ramda/repl/hooks","issue_events_url":"https://api.github.com/repos/ramda/repl/issues/events{/number}","events_url":"https://api.github.com/repos/ramda/repl/events","assignees_url":"https://api.github.com/repos/ramda/repl/assignees{/user}","branches_url":"https://api.github.com/repos/ramda/repl/branches{/branch}","tags_url":"https://api.github.com/repos/ramda/repl/tags","blobs_url":"https://api.github.com/repos/ramda/repl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ramda/repl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ramda/repl/git/refs{/sha}","trees_url":"https://api.github.com/repos/ramda/repl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ramda/repl/statuses/{sha}","languages_url":"https://api.github.com/repos/ramda/repl/languages","stargazers_url":"https://api.github.com/repos/ramda/repl/stargazers","contributors_url":"https://api.github.com/repos/ramda/repl/contributors","subscribers_url":"https://api.github.com/repos/ramda/repl/subscribers","subscription_url":"https://api.github.com/repos/ramda/repl/subscription","commits_url":"https://api.github.com/repos/ramda/repl/commits{/sha}","git_commits_url":"https://api.github.com/repos/ramda/repl/git/commits{/sha}","comments_url":"https://api.github.com/repos/ramda/repl/comments{/number}","issue_comment_url":"https://api.github.com/repos/ramda/repl/issues/comments{/number}","contents_url":"https://api.github.com/repos/ramda/repl/contents/{+path}","compare_url":"https://api.github.com/repos/ramda/repl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ramda/repl/merges","archive_url":"https://api.github.com/repos/ramda/repl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ramda/repl/downloads","issues_url":"https://api.github.com/repos/ramda/repl/issues{/number}","pulls_url":"https://api.github.com/repos/ramda/repl/pulls{/number}","milestones_url":"https://api.github.com/repos/ramda/repl/milestones{/number}","notifications_url":"https://api.github.com/repos/ramda/repl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ramda/repl/labels{/name}","releases_url":"https://api.github.com/repos/ramda/repl/releases{/id}","deployments_url":"https://api.github.com/repos/ramda/repl/deployments","created_at":"2016-09-13T22:14:40Z","updated_at":"2016-09-26T21:44:42Z","pushed_at":"2016-10-12T07:17:00Z","git_url":"git://github.com/ramda/repl.git","ssh_url":"git@github.com:ramda/repl.git","clone_url":"https://github.com/ramda/repl.git","svn_url":"https://github.com/ramda/repl","homepage":null,"size":2703,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ramda/repl/pulls/25"},"html":{"href":"https://github.com/ramda/repl/pull/25"},"issue":{"href":"https://api.github.com/repos/ramda/repl/issues/25"},"comments":{"href":"https://api.github.com/repos/ramda/repl/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/ramda/repl/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/ramda/repl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ramda/repl/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/ramda/repl/statuses/32f7316148f3b0e9f4a1360d19c5a0923eec3c75"}}}}
{"actor":{"display_login":"craigdallimore"}}