disinclined.org
/
git
/
mudd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ac86d15
)
minor improvements (scroll down on msg)
author
Dylan Lloyd
<dylan@dylansserver.com>
Thu, 29 Aug 2013 09:43:50 +0000
(09:43 +0000)
committer
Dylan Lloyd
<dylan@dylansserver.com>
Thu, 29 Aug 2013 09:43:50 +0000
(09:43 +0000)
index.php
patch
|
blob
|
history
mud.js
patch
|
blob
|
history
diff --git
a/index.php
b/index.php
index
ce8a197
..
8e8360e
100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-2,11
+2,9
@@
<html>
<head>
<title>mud</title>
<html>
<head>
<title>mud</title>
- <link type='text/css' rel='stylesheet' href='style.css'>
- <script type='text/javascript' src='jquery-core.js'></script>
-<!--
- <script type='text/javascript' src='mud.js'></script>
--->
+ <link type='text/css' rel='stylesheet' href='/mud/style.css'>
+ <script type='text/javascript' src='/mud/jquery-core.js'></script>
+ <script type='text/javascript' src='/mud/mud.js'></script>
</head>
<body>
<canvas width='450px' height='450px' id='universe'></canvas>
</head>
<body>
<canvas width='450px' height='450px' id='universe'></canvas>
diff --git
a/mud.js
b/mud.js
index
45373cc
..
1fee512
100644
(file)
--- a/
mud.js
+++ b/
mud.js
@@
-155,7
+155,8
@@
$(document).ready(function(){
$('<span>').addClass(style).text(action),
$('<span>').addClass('msg').text(msg)
)
$('<span>').addClass(style).text(action),
$('<span>').addClass('msg').text(msg)
)
- )
+ );
+ $("#log").animate({ scrollTop: $('#log')[0].scrollHeight}, 1000);
}
$('#submit').click(function() {
var text = $('#chat').val();
}
$('#submit').click(function() {
var text = $('#chat').val();
@@
-214,6
+215,7
@@
$(document).ready(function(){
var msg = messages[i];
if (msg.id == self.player.id) continue;
writeToLog(msg.name + ':', msg.type, msg.message);
var msg = messages[i];
if (msg.id == self.player.id) continue;
writeToLog(msg.name + ':', msg.type, msg.message);
+ $("#log").animate({ scrollTop: $('#log')[0].scrollHeight}, 1000);
}
});
}
}
});
}