mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 21:25:46 +01:00
changed the object config path, because I derped
This commit is contained in:
parent
8cb615e291
commit
954a64c93d
@ -7,7 +7,7 @@ componentconstructors['chatbox'] = function(dynmap, configuration) {
|
|||||||
.addClass('messagelist')
|
.addClass('messagelist')
|
||||||
.appendTo(chat);
|
.appendTo(chat);
|
||||||
|
|
||||||
if (dynmap.options.scrollback) {
|
if (configuration.scrollback) {
|
||||||
messagelist.addClass('scrollback')
|
messagelist.addClass('scrollback')
|
||||||
.click( function() { $(this).hide(); } );
|
.click( function() { $(this).hide(); } );
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ componentconstructors['chatbox'] = function(dynmap, configuration) {
|
|||||||
})
|
})
|
||||||
.appendTo(chat);
|
.appendTo(chat);
|
||||||
|
|
||||||
if (dynmap.options.scrollback) {
|
if (configuration.scrollback) {
|
||||||
chatinput.click(function(){
|
chatinput.click(function(){
|
||||||
var m = $('.messagelist');
|
var m = $('.messagelist');
|
||||||
m.show().scrollTop(m.scrollHeight());
|
m.show().scrollTop(m.scrollHeight());
|
||||||
@ -40,9 +40,9 @@ componentconstructors['chatbox'] = function(dynmap, configuration) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var addrow = function(row) {
|
var addrow = function(row) {
|
||||||
if (dynmap.options.scrollback) {
|
if (configuration.scrollback) {
|
||||||
var c = messagelist.children();
|
var c = messagelist.children();
|
||||||
c.slice(0, Math.max(0, c.length-dynmap.options.scrollback)).each(function(index, elem){ $(elem).remove(); });
|
c.slice(0, Math.max(0, c.length-configuration.scrollback)).each(function(index, elem){ $(elem).remove(); });
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function() { row.remove(); }, (configuration.messagettl * 1000));
|
setTimeout(function() { row.remove(); }, (configuration.messagettl * 1000));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user