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
871e16cf
Commit
871e16cf
authored
Nov 21, 2014
by
Christian
Committed by
chriseth
Jul 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile again when flipping optimizer box.
parent
56fb312d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
index.html
index.html
+9
-4
No files found.
index.html
View file @
871e16cf
...
...
@@ -119,20 +119,25 @@ editor.getSession().setUseSoftTabs(true);
var
compileString
=
Module
.
cwrap
(
"compileString"
,
"string"
,
[
"string"
,
"number"
]);
var
previousInput
=
''
;
var
outputArea
=
document
.
querySelector
(
'#output'
);
var
onChang
e
=
function
()
{
var
compil
e
=
function
()
{
var
input
=
editor
.
getValue
();
var
optimize
=
document
.
querySelector
(
'#optimize'
).
checked
;
if
(
input
==
previousInput
)
return
;
previousInput
=
input
;
try
{
outputArea
.
innerHTML
=
compileString
(
input
,
optimize
?
1
:
0
);
}
catch
(
exception
)
{
outputArea
.
innerHTML
=
"Uncaught JavaScript Exception:
\
n"
+
exception
;
}
}
var
onChange
=
function
()
{
var
input
=
editor
.
getValue
();
if
(
input
==
previousInput
)
return
;
previousInput
=
input
;
compile
();
};
editor
.
getSession
().
on
(
'change'
,
onChange
);
document
.
querySelector
(
'#optimize'
).
addEventListener
(
'change'
,
compile
);
onChange
();
</script>
...
...
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