topical media & game development
lib-js-terminal-sample-import.htm / htm
<html>
<head>
<title>termlib Text Import Sample</title>
<script language="JavaScript" type="text/javascript" src="lib-js-terminal-termlib.js"></script>
<script type="text/javascript">
<!--
// *** text import sample ***
// mass:werk, N.Landsteiner 2007
var term;
function termOpen() {
if ((!term) || (term.closed)) {
term = new Terminal(
{
x: 220,
y: 70,
termDiv: 'termDiv',
bgColor: '#232e45',
greeting: '%+r **** termlib.js import sample **** %-r\%n\%n * any text is simply echoed\%n * for imports use the links at the left\%n * type "exit" to quit.\%n ',
handler: termHandler,
exitHandler: termExitHandler
}
);
term.open();
// dimm UI text
var mainPane = (document.getElementById)?
document.getElementById('mainPane') : document.all.mainPane;
if (mainPane) mainPane.className = 'lh15 dimmed';
}
}
function termHandler() {
// default handler + exit
this.newLine();
if (this.lineBuffer.search(/^\s*exit\s*
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.