{"action":"created","comment":{"url":"https://api.github.com/repos/aninternetof/rovercode/pulls/comments/84170537","pull_request_review_id":4964830,"id":84170537,"diff_hunk":"@@ -94,11 +93,23 @@ function acceptName() {\n \t\t\t\tsaveDesign();\r\n \t\t\t\t$('#nameErrorArea').empty();\r\n \t\t\t\t$('a#designNameArea').text(designName);\r\n-\t\t\t\t$('a#downloadLink').attr(\"href\", \"saved-bds/\"+designName+\".xml\");\r\n-\t\t\t\t$('a#downloadLink').attr(\"download\", designName+\".xml\");\r\n+\t\t\t\t$('a#downloadLink').attr(\"onclick\", \"return downloadDesign(\\\"\"+designName+\".xml\\\")\");\r\n \t\t\t\t$('#nameModal').foundation('reveal', 'close');\r\n \t\t\t}\r\n \t\t});\r\n \t}\r\n \r\n }\r\n+\r\n+function downloadDesign(name) {\r\n+  $.get(roverResource(['download', name]), function(response) {\r\n+    var blob = new Blob([new XMLSerializer().serializeToString(response)]);\r\n+    var downloadUrl = URL.createObjectURL(blob);\r\n+    $(document.createElement('a'))\r\n+      .attr( {'download': name, 'href': downloadUrl} )\r\n+      .get(0)\r\n+      .click();\r","path":"www/js/rover-api.js","position":31,"original_position":31,"commit_id":"1a3a47d5666d90110f3a70946646d2337b1d32ad","original_commit_id":"1a3a47d5666d90110f3a70946646d2337b1d32ad","user":{"login":"wavetylor","id":1432059,"avatar_url":"https://avatars.githubusercontent.com/u/1432059?v=3","gravatar_id":"","url":"https://api.github.com/users/wavetylor","html_url":"https://github.com/wavetylor","followers_url":"https://api.github.com/users/wavetylor/followers","following_url":"https://api.github.com/users/wavetylor/following{/other_user}","gists_url":"https://api.github.com/users/wavetylor/gists{/gist_id}","starred_url":"https://api.github.com/users/wavetylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wavetylor/subscriptions","organizations_url":"https://api.github.com/users/wavetylor/orgs","repos_url":"https://api.github.com/users/wavetylor/repos","events_url":"https://api.github.com/users/wavetylor/events{/privacy}","received_events_url":"https://api.github.com/users/wavetylor/received_events","type":"User","site_admin":false},"body":"yea, that's exactly how we do it at work.","created_at":"2016-10-19T21:25:09Z","updated_at":"2016-10-19T21:25:10Z","html_url":"https://github.com/aninternetof/rovercode/pull/51#discussion_r84170537","pull_request_url":"https://api.github.com/repos/aninternetof/rovercode/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/aninternetof/rovercode/pulls/comments/84170537"},"html":{"href":"https://github.com/aninternetof/rovercode/pull/51#discussion_r84170537"},"pull_request":{"href":"https://api.github.com/repos/aninternetof/rovercode/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/aninternetof/rovercode/pulls/51","id":89811469,"html_url":"https://github.com/aninternetof/rovercode/pull/51","diff_url":"https://github.com/aninternetof/rovercode/pull/51.diff","patch_url":"https://github.com/aninternetof/rovercode/pull/51.patch","issue_url":"https://api.github.com/repos/aninternetof/rovercode/issues/51","number":51,"state":"open","locked":false,"title":"Migrate downloading of saved bd to flask","user":{"login":"cabarnes","id":1184314,"avatar_url":"https://avatars.githubusercontent.com/u/1184314?v=3","gravatar_id":"","url":"https://api.github.com/users/cabarnes","html_url":"https://github.com/cabarnes","followers_url":"https://api.github.com/users/cabarnes/followers","following_url":"https://api.github.com/users/cabarnes/following{/other_user}","gists_url":"https://api.github.com/users/cabarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/cabarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cabarnes/subscriptions","organizations_url":"https://api.github.com/users/cabarnes/orgs","repos_url":"https://api.github.com/users/cabarnes/repos","events_url":"https://api.github.com/users/cabarnes/events{/privacy}","received_events_url":"https://api.github.com/users/cabarnes/received_events","type":"User","site_admin":false},"body":"This addresses issue #39.\r\n\r\nOne thing that I noticed while doing this is that we have the `saved-bds` directory hardcoded a lot. I think we might want to either define it at the top or use a [flask configuration](http://flask.pocoo.org/docs/0.11/config/).","created_at":"2016-10-18T13:08:51Z","updated_at":"2016-10-19T21:25:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c76be098a9ef12a6859a7b09940c43db90b5596","assignee":{"login":"aninternetof","id":976857,"avatar_url":"https://avatars.githubusercontent.com/u/976857?v=3","gravatar_id":"","url":"https://api.github.com/users/aninternetof","html_url":"https://github.com/aninternetof","followers_url":"https://api.github.com/users/aninternetof/followers","following_url":"https://api.github.com/users/aninternetof/following{/other_user}","gists_url":"https://api.github.com/users/aninternetof/gists{/gist_id}","starred_url":"https://api.github.com/users/aninternetof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aninternetof/subscriptions","organizations_url":"https://api.github.com/users/aninternetof/orgs","repos_url":"https://api.github.com/users/aninternetof/repos","events_url":"https://api.github.com/users/aninternetof/events{/privacy}","received_events_url":"https://api.github.com/users/aninternetof/received_events","type":"User","site_admin":false},"assignees":[{"login":"aninternetof","id":976857,"avatar_url":"https://avatars.githubusercontent.com/u/976857?v=3","gravatar_id":"","url":"https://api.github.com/users/aninternetof","html_url":"https://github.com/aninternetof","followers_url":"https://api.github.com/users/aninternetof/followers","following_url":"https://api.github.com/users/aninternetof/following{/other_user}","gists_url":"https://api.github.com/users/aninternetof/gists{/gist_id}","starred_url":"https://api.github.com/users/aninternetof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aninternetof/subscriptions","organizations_url":"https://api.github.com/users/aninternetof/orgs","repos_url":"https://api.github.com/users/aninternetof/repos","events_url":"https://api.github.com/users/aninternetof/events{/privacy}","received_events_url":"https://api.github.com/users/aninternetof/received_events","type":"User","site_admin":false},{"login":"wavetylor","id":1432059,"avatar_url":"https://avatars.githubusercontent.com/u/1432059?v=3","gravatar_id":"","url":"https://api.github.com/users/wavetylor","html_url":"https://github.com/wavetylor","followers_url":"https://api.github.com/users/wavetylor/followers","following_url":"https://api.github.com/users/wavetylor/following{/other_user}","gists_url":"https://api.github.com/users/wavetylor/gists{/gist_id}","starred_url":"https://api.github.com/users/wavetylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wavetylor/subscriptions","organizations_url":"https://api.github.com/users/wavetylor/orgs","repos_url":"https://api.github.com/users/wavetylor/repos","events_url":"https://api.github.com/users/wavetylor/events{/privacy}","received_events_url":"https://api.github.com/users/wavetylor/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/aninternetof/rovercode/milestones/2","html_url":"https://github.com/aninternetof/rovercode/milestones/Release%200.2","labels_url":"https://api.github.com/repos/aninternetof/rovercode/milestones/2/labels","id":1626381,"number":2,"title":"Release 0.2","description":"Migration from PHP to a flask service. Cleaning and easing installing.","creator":{"login":"aninternetof","id":976857,"avatar_url":"https://avatars.githubusercontent.com/u/976857?v=3","gravatar_id":"","url":"https://api.github.com/users/aninternetof","html_url":"https://github.com/aninternetof","followers_url":"https://api.github.com/users/aninternetof/followers","following_url":"https://api.github.com/users/aninternetof/following{/other_user}","gists_url":"https://api.github.com/users/aninternetof/gists{/gist_id}","starred_url":"https://api.github.com/users/aninternetof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aninternetof/subscriptions","organizations_url":"https://api.github.com/users/aninternetof/orgs","repos_url":"https://api.github.com/users/aninternetof/repos","events_url":"https://api.github.com/users/aninternetof/events{/privacy}","received_events_url":"https://api.github.com/users/aninternetof/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":12,"state":"open","created_at":"2016-03-07T14:29:17Z","updated_at":"2016-10-18T13:08:52Z","due_on":"2016-10-09T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/aninternetof/rovercode/pulls/51/commits","review_comments_url":"https://api.github.com/repos/aninternetof/rovercode/pulls/51/comments","review_comment_url":"https://api.github.com/repos/aninternetof/rovercode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aninternetof/rovercode/issues/51/comments","statuses_url":"https://api.github.com/repos/aninternetof/rovercode/statuses/1a3a47d5666d90110f3a70946646d2337b1d32ad","head":{"label":"cabarnes:feature/39-download-bd-to-flask","ref":"feature/39-download-bd-to-flask","sha":"1a3a47d5666d90110f3a70946646d2337b1d32ad","user":{"login":"cabarnes","id":1184314,"avatar_url":"https://avatars.githubusercontent.com/u/1184314?v=3","gravatar_id":"","url":"https://api.github.com/users/cabarnes","html_url":"https://github.com/cabarnes","followers_url":"https://api.github.com/users/cabarnes/followers","following_url":"https://api.github.com/users/cabarnes/following{/other_user}","gists_url":"https://api.github.com/users/cabarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/cabarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cabarnes/subscriptions","organizations_url":"https://api.github.com/users/cabarnes/orgs","repos_url":"https://api.github.com/users/cabarnes/repos","events_url":"https://api.github.com/users/cabarnes/events{/privacy}","received_events_url":"https://api.github.com/users/cabarnes/received_events","type":"User","site_admin":false},"repo":{"id":68050022,"name":"rovercode","full_name":"cabarnes/rovercode","owner":{"login":"cabarnes","id":1184314,"avatar_url":"https://avatars.githubusercontent.com/u/1184314?v=3","gravatar_id":"","url":"https://api.github.com/users/cabarnes","html_url":"https://github.com/cabarnes","followers_url":"https://api.github.com/users/cabarnes/followers","following_url":"https://api.github.com/users/cabarnes/following{/other_user}","gists_url":"https://api.github.com/users/cabarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/cabarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cabarnes/subscriptions","organizations_url":"https://api.github.com/users/cabarnes/orgs","repos_url":"https://api.github.com/users/cabarnes/repos","events_url":"https://api.github.com/users/cabarnes/events{/privacy}","received_events_url":"https://api.github.com/users/cabarnes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cabarnes/rovercode","description":"Block-based programming for educational robots","fork":true,"url":"https://api.github.com/repos/cabarnes/rovercode","forks_url":"https://api.github.com/repos/cabarnes/rovercode/forks","keys_url":"https://api.github.com/repos/cabarnes/rovercode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cabarnes/rovercode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cabarnes/rovercode/teams","hooks_url":"https://api.github.com/repos/cabarnes/rovercode/hooks","issue_events_url":"https://api.github.com/repos/cabarnes/rovercode/issues/events{/number}","events_url":"https://api.github.com/repos/cabarnes/rovercode/events","assignees_url":"https://api.github.com/repos/cabarnes/rovercode/assignees{/user}","branches_url":"https://api.github.com/repos/cabarnes/rovercode/branches{/branch}","tags_url":"https://api.github.com/repos/cabarnes/rovercode/tags","blobs_url":"https://api.github.com/repos/cabarnes/rovercode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cabarnes/rovercode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cabarnes/rovercode/git/refs{/sha}","trees_url":"https://api.github.com/repos/cabarnes/rovercode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cabarnes/rovercode/statuses/{sha}","languages_url":"https://api.github.com/repos/cabarnes/rovercode/languages","stargazers_url":"https://api.github.com/repos/cabarnes/rovercode/stargazers","contributors_url":"https://api.github.com/repos/cabarnes/rovercode/contributors","subscribers_url":"https://api.github.com/repos/cabarnes/rovercode/subscribers","subscription_url":"https://api.github.com/repos/cabarnes/rovercode/subscription","commits_url":"https://api.github.com/repos/cabarnes/rovercode/commits{/sha}","git_commits_url":"https://api.github.com/repos/cabarnes/rovercode/git/commits{/sha}","comments_url":"https://api.github.com/repos/cabarnes/rovercode/comments{/number}","issue_comment_url":"https://api.github.com/repos/cabarnes/rovercode/issues/comments{/number}","contents_url":"https://api.github.com/repos/cabarnes/rovercode/contents/{+path}","compare_url":"https://api.github.com/repos/cabarnes/rovercode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cabarnes/rovercode/merges","archive_url":"https://api.github.com/repos/cabarnes/rovercode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cabarnes/rovercode/downloads","issues_url":"https://api.github.com/repos/cabarnes/rovercode/issues{/number}","pulls_url":"https://api.github.com/repos/cabarnes/rovercode/pulls{/number}","milestones_url":"https://api.github.com/repos/cabarnes/rovercode/milestones{/number}","notifications_url":"https://api.github.com/repos/cabarnes/rovercode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cabarnes/rovercode/labels{/name}","releases_url":"https://api.github.com/repos/cabarnes/rovercode/releases{/id}","deployments_url":"https://api.github.com/repos/cabarnes/rovercode/deployments","created_at":"2016-09-12T21:32:23Z","updated_at":"2016-09-12T21:32:24Z","pushed_at":"2016-10-18T01:51:36Z","git_url":"git://github.com/cabarnes/rovercode.git","ssh_url":"git@github.com:cabarnes/rovercode.git","clone_url":"https://github.com/cabarnes/rovercode.git","svn_url":"https://github.com/cabarnes/rovercode","homepage":"http://rovercode.org/","size":3315,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"master"}},"base":{"label":"aninternetof:development","ref":"development","sha":"1efe423f739cc2e26545f39cf43202afc4d55247","user":{"login":"aninternetof","id":976857,"avatar_url":"https://avatars.githubusercontent.com/u/976857?v=3","gravatar_id":"","url":"https://api.github.com/users/aninternetof","html_url":"https://github.com/aninternetof","followers_url":"https://api.github.com/users/aninternetof/followers","following_url":"https://api.github.com/users/aninternetof/following{/other_user}","gists_url":"https://api.github.com/users/aninternetof/gists{/gist_id}","starred_url":"https://api.github.com/users/aninternetof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aninternetof/subscriptions","organizations_url":"https://api.github.com/users/aninternetof/orgs","repos_url":"https://api.github.com/users/aninternetof/repos","events_url":"https://api.github.com/users/aninternetof/events{/privacy}","received_events_url":"https://api.github.com/users/aninternetof/received_events","type":"User","site_admin":false},"repo":{"id":48381501,"name":"rovercode","full_name":"aninternetof/rovercode","owner":{"login":"aninternetof","id":976857,"avatar_url":"https://avatars.githubusercontent.com/u/976857?v=3","gravatar_id":"","url":"https://api.github.com/users/aninternetof","html_url":"https://github.com/aninternetof","followers_url":"https://api.github.com/users/aninternetof/followers","following_url":"https://api.github.com/users/aninternetof/following{/other_user}","gists_url":"https://api.github.com/users/aninternetof/gists{/gist_id}","starred_url":"https://api.github.com/users/aninternetof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aninternetof/subscriptions","organizations_url":"https://api.github.com/users/aninternetof/orgs","repos_url":"https://api.github.com/users/aninternetof/repos","events_url":"https://api.github.com/users/aninternetof/events{/privacy}","received_events_url":"https://api.github.com/users/aninternetof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aninternetof/rovercode","description":"Block-based programming for educational robots","fork":false,"url":"https://api.github.com/repos/aninternetof/rovercode","forks_url":"https://api.github.com/repos/aninternetof/rovercode/forks","keys_url":"https://api.github.com/repos/aninternetof/rovercode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aninternetof/rovercode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aninternetof/rovercode/teams","hooks_url":"https://api.github.com/repos/aninternetof/rovercode/hooks","issue_events_url":"https://api.github.com/repos/aninternetof/rovercode/issues/events{/number}","events_url":"https://api.github.com/repos/aninternetof/rovercode/events","assignees_url":"https://api.github.com/repos/aninternetof/rovercode/assignees{/user}","branches_url":"https://api.github.com/repos/aninternetof/rovercode/branches{/branch}","tags_url":"https://api.github.com/repos/aninternetof/rovercode/tags","blobs_url":"https://api.github.com/repos/aninternetof/rovercode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aninternetof/rovercode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aninternetof/rovercode/git/refs{/sha}","trees_url":"https://api.github.com/repos/aninternetof/rovercode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aninternetof/rovercode/statuses/{sha}","languages_url":"https://api.github.com/repos/aninternetof/rovercode/languages","stargazers_url":"https://api.github.com/repos/aninternetof/rovercode/stargazers","contributors_url":"https://api.github.com/repos/aninternetof/rovercode/contributors","subscribers_url":"https://api.github.com/repos/aninternetof/rovercode/subscribers","subscription_url":"https://api.github.com/repos/aninternetof/rovercode/subscription","commits_url":"https://api.github.com/repos/aninternetof/rovercode/commits{/sha}","git_commits_url":"https://api.github.com/repos/aninternetof/rovercode/git/commits{/sha}","comments_url":"https://api.github.com/repos/aninternetof/rovercode/comments{/number}","issue_comment_url":"https://api.github.com/repos/aninternetof/rovercode/issues/comments{/number}","contents_url":"https://api.github.com/repos/aninternetof/rovercode/contents/{+path}","compare_url":"https://api.github.com/repos/aninternetof/rovercode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aninternetof/rovercode/merges","archive_url":"https://api.github.com/repos/aninternetof/rovercode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aninternetof/rovercode/downloads","issues_url":"https://api.github.com/repos/aninternetof/rovercode/issues{/number}","pulls_url":"https://api.github.com/repos/aninternetof/rovercode/pulls{/number}","milestones_url":"https://api.github.com/repos/aninternetof/rovercode/milestones{/number}","notifications_url":"https://api.github.com/repos/aninternetof/rovercode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aninternetof/rovercode/labels{/name}","releases_url":"https://api.github.com/repos/aninternetof/rovercode/releases{/id}","deployments_url":"https://api.github.com/repos/aninternetof/rovercode/deployments","created_at":"2015-12-21T16:15:11Z","updated_at":"2016-09-09T14:35:56Z","pushed_at":"2016-10-19T19:46:03Z","git_url":"git://github.com/aninternetof/rovercode.git","ssh_url":"git@github.com:aninternetof/rovercode.git","clone_url":"https://github.com/aninternetof/rovercode.git","svn_url":"https://github.com/aninternetof/rovercode","homepage":"http://rovercode.org/","size":3327,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":23,"forks":3,"open_issues":23,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aninternetof/rovercode/pulls/51"},"html":{"href":"https://github.com/aninternetof/rovercode/pull/51"},"issue":{"href":"https://api.github.com/repos/aninternetof/rovercode/issues/51"},"comments":{"href":"https://api.github.com/repos/aninternetof/rovercode/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/aninternetof/rovercode/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/aninternetof/rovercode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aninternetof/rovercode/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/aninternetof/rovercode/statuses/1a3a47d5666d90110f3a70946646d2337b1d32ad"}}}}
{"actor":{"display_login":"wavetylor"}}