1 $(document).ready( function(){
3 $('form#eval textarea').each( function() {
4 console.debug('grow',this);
7 console.debug( 'textarea_grow', rows, this );
8 var grow = function(ta) {
9 var lines = ta.value.split('\n').length;
10 if ( lines != rows ) {
13 console.debug('keyup', lines, rows, ta );
17 this.onkeyup = function() { grow(this) };
20 $('input#close').click( function(){
21 console.debug( 'close console' );
22 $.post( document.location, { code: '' } );
23 $(this).parent().hide();
26 var $out = $('pre#out');
27 if ( $out.height() > ( $(window).height() / 3 * 2 ) ) {
28 $out.height( $(window).height() / 3 * 2 ).css({ overflow: 'auto' });
31 $('a#console').click( function() {
32 console.debug('open console');
33 var $f = $('form#eval');
34 if ( $f.is(':visible') ) {