Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Kellershoff
pwny.gorilla.moe
Commits
7d2e089c
Verified
Commit
7d2e089c
authored
Dec 07, 2017
by
Marco Kellershoff
🤸
Browse files
Hide output "window" on load
Show only when "Run"-button is pressed and "isCompilable" === true
parent
1ed9a6bc
Changes
1
Show whitespace changes
Inline
Side-by-side
assets/pwny.js
View file @
7d2e089c
...
...
@@ -288,6 +288,7 @@
};
this
.
autoRun
=
function
()
{
this
.
showAndHideOutput
();
window
.
mockhtml
();
var
app
=
document
.
querySelector
(
'
#app
'
);
var
logo
=
document
.
querySelector
(
'
#logo
'
);
...
...
@@ -401,17 +402,27 @@
return
comp
.
includes
(
current_syntax
);
};
this
.
showAndHide
Run
=
function
()
{
this
.
showAndHide
Output
=
function
()
{
var
is_compilable
=
self
.
isCompilable
();
if
(
is_compilable
===
false
)
{
$
(
col1
).
removeClass
(
'
col-xs-6
'
);
$
(
col1
).
addClass
(
'
col-xs-12
'
);
$
(
col2
).
addClass
(
'
hidden
'
);
btn_run
.
style
.
display
=
'
none
'
;
}
else
{
$
(
col1
).
addClass
(
'
col-xs-6
'
);
$
(
col1
).
removeClass
(
'
col-xs-12
'
);
$
(
col2
).
removeClass
(
'
hidden
'
);
}
};
this
.
showAndHideRun
=
function
()
{
var
is_compilable
=
self
.
isCompilable
();
$
(
col1
).
removeClass
(
'
col-xs-6
'
);
$
(
col1
).
addClass
(
'
col-xs-12
'
);
$
(
col2
).
addClass
(
'
hidden
'
);
if
(
is_compilable
===
false
)
{
btn_run
.
style
.
display
=
'
none
'
;
}
else
{
btn_run
.
style
.
display
=
'
inline-block
'
;
}
};
...
...
@@ -513,6 +524,7 @@
btn_run
.
onclick
=
function
(
evt
){
evt
.
preventDefault
();
self
.
showAndHideOutput
();
window
.
mockhtml
();
};
...
...
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