Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
3bd46038
Commit
3bd46038
authored
Jun 03, 2016
by
chriseth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #45 from ethereum/fixImport
Fixed import from github.
parents
682f8af6
398f3fea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app.js
src/app.js
+2
-2
compiler.js
src/app/compiler.js
+1
-1
No files found.
src/app.js
View file @
3bd46038
...
...
@@ -403,8 +403,8 @@ var run = function() {
// ----------------- compiler ----------------------
function
handleGithubCall
(
root
,
path
,
cb
)
{
$
(
'#output'
).
append
(
$
(
'<div/>'
).
append
(
$
(
'<pre/>'
).
text
(
"Loading github.com/"
+
root
+
" ..."
)));
return
$
.
getJSON
(
'https://api.github.com/repos/'
+
root
+
'/contents/'
+
path
,
cb
);
$
(
'#output'
).
append
(
$
(
'<div/>'
).
append
(
$
(
'<pre/>'
).
text
(
"Loading github.com/"
+
root
+
"
/"
+
path
+
"
..."
)));
return
$
.
getJSON
(
'https://api.github.com/repos/'
+
root
+
'/contents/'
+
path
,
cb
);
}
var
compiler
=
new
Compiler
(
web3
,
editor
,
handleGithubCall
,
$
(
'#output'
),
getHidingRHP
,
updateFiles
);
...
...
src/app/compiler.js
View file @
3bd46038
...
...
@@ -181,7 +181,7 @@ function Compiler(web3, editor, handleGithubCall, outputField, hidingRHP, update
files
[
m
]
=
cachedRemoteFiles
[
m
];
reloop
=
true
;
}
else
if
(
githubMatch
=
/^
(
https
?
:
\/\/)?(
www.
)?
github.com
\/([^\/]
*
\/[^\/]
*
)\/(
.*
)
/
.
exec
(
m
))
{
handleGithubCall
(
function
(
result
)
{
handleGithubCall
(
githubMatch
[
3
],
githubMatch
[
4
],
function
(
result
)
{
if
(
'content'
in
result
)
{
var
content
=
Base64
.
decode
(
result
.
content
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment