mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-28 21:48:00 +01:00
9baffa95e6
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1884 b35dd754-fafc-0310-a699-88a17e54d16e
56 lines
No EOL
1.7 KiB
HTML
56 lines
No EOL
1.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta http-equiv="cache-control" content="no-cache">
|
|
<title>Chat Session</title>
|
|
<script language="JavaScript" type="text/javascript">
|
|
var currUsername = window.parent.frames['data'].currUsername;
|
|
var data = window.parent.frames['data'].data;
|
|
function printChat() {
|
|
for (var i in data) {
|
|
if (data[i][0] == '') {
|
|
// server message
|
|
document.write("<div class='chat-statement'><span class='server-message'>"
|
|
+ data[i][1] + "</span></div>");
|
|
}
|
|
else {
|
|
// conversation part
|
|
var partialClassName = (data[i][0] == currUsername) ? "-user" : "";
|
|
document.write("<div class='chat-statement'><span class='chat-username"
|
|
+ partialClassName + "'>" + data[i][0]
|
|
+ ":</span> <span class='chat-text"+ partialClassName
|
|
+ "'>" + data[i][1] + "</span></div>");
|
|
}
|
|
}
|
|
window.focus();
|
|
}
|
|
</script>
|
|
<style type="text/css">
|
|
.chat-username { font-weight : bold; color : blue; }
|
|
.chat-username-user { font-weight : bold; color : red; }
|
|
.chat-statement { padding-bottom : 3px; }
|
|
.server-message { font-color : #999; font-style : italic; }
|
|
</style>
|
|
</head>
|
|
|
|
<body bgcolor="#ffffff" leftmargin="5">
|
|
|
|
<script language="JavaScript" type="text/javascript">
|
|
printChat();
|
|
</script>
|
|
|
|
|
|
|
|
<script language="JavaScript" type="text/javascript">
|
|
var data = window.parent.frames['data'].data;
|
|
if (data != null) {
|
|
self.scrollTo(0,(30*data.length));
|
|
// Do not delete second line! IE needs it for some reason...
|
|
self.scrollTo(0,(30*data.length));
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html> |