mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-30 02:02:06 +01:00
7857d170be
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1871 b35dd754-fafc-0310-a699-88a17e54d16e
55 lines
No EOL
1.7 KiB
HTML
55 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>");
|
|
}
|
|
}
|
|
}
|
|
</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> |