eg/tryhy: add blinking cursor
This commit is contained in:
parent
c02a1c6b4a
commit
b099925eb2
@ -20,3 +20,19 @@ div.console div.jquery-console-welcome
|
|||||||
{ color:#52666f; font-family:monospace;
|
{ color:#52666f; font-family:monospace;
|
||||||
padding:0.1em; }
|
padding:0.1em; }
|
||||||
div.console span.jquery-console-prompt-label { font-weight:bold }
|
div.console span.jquery-console-prompt-label { font-weight:bold }
|
||||||
|
|
||||||
|
span.jquery-console-cursor.running {
|
||||||
|
-webkit-animation-duration: 0.1s;
|
||||||
|
-webkit-animation-name: blink;
|
||||||
|
-webkit-animation-iteration-count: infinite;
|
||||||
|
-webkit-animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes blink {
|
||||||
|
from {
|
||||||
|
opacity: 1.0
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
}
|
@ -7,6 +7,7 @@ $(document).ready(function(){
|
|||||||
else return true;
|
else return true;
|
||||||
},
|
},
|
||||||
commandHandle:function(line, report){
|
commandHandle:function(line, report){
|
||||||
|
$('.jquery-console-cursor').addClass('running');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: '/eval',
|
url: '/eval',
|
||||||
@ -14,6 +15,7 @@ $(document).ready(function(){
|
|||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
$('.jquery-console-cursor').removeClass('running');
|
||||||
report([{msg : data.stdout, className:'jquery-console-message-value'},
|
report([{msg : data.stdout, className:'jquery-console-message-value'},
|
||||||
{msg : data.stderr, className:'jquery-console-message-error'}]);
|
{msg : data.stderr, className:'jquery-console-message-error'}]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user