All pastes #211641 Raw Edit

Untitled

public text v1 · immutable
#211641 ·published 2006-10-20 12:29 UTC
rendered paste body
<style type="text/css">
<!--
#console, #console input{
	background-color:#000;
	font-family:monospace;
	font-weight:bold;
	color:#fff;
	border:0px;
}

#screen {
	background-color:#000;
	color:#fff;
	font-family:monospace;
	font-weight:bold;
	padding:5px;
	width:600px;
	height:400px;
	vertical-align:bottom;
	overflow:hidden;
}
-->
</style>

<script type="text/javascript">
<!--
var loc = './';
document.onkeydown = keyListener;

function $(a) {
	return document.getElementById(a);
}

function append(a) {
	$('screen').innerHTML = loc+" > "+a+"<br />"+$('screen').innerHTML;
	return 1;
}

function updateLoc(a) {
	loc = a;
	return 1;
}

function execute(a) {
	//ajax in here, on recieval on information output with append('this is the content')
	//for a cd, you could just update loc with updateLoc('./home')
}

function keyListener(e){
	a = $('write');
	if(!e){ e = window.event;}
	switch(e.keyCode) {
		case 13: append(a.value); execute(a.value); a.value=''; a.focus(); break;
	}
}
-->
</script>
<table id="console">
	<tr>
		<td><input type="text" id="write" size="89" /></td>
	</tr>
	<tr>
		<td>
			<div id="screen"></div>
		</td>
	</tr>
</table>