User:Dorumin/chat.js

importArticles({   type: 'script',    articles: [        'u:dev:PrivateHistory/code.js'    ] });

mainRoom.model.chats.bind('afteradd', function {   var div = mainRoom.viewDiscussion.chatDiv.get(0);    if (div.scrollHeight - div.scrollTop - div.clientHeight < 500) {        mainRoom.viewDiscussion.scrollToBottom;    } });