Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this is now useless becausse there was a recent chat history update
- funcstr = onmes.toString();
- funcstr = funcstr.replaceAll('document.getElementById("chatfield").appendChild(dv);', 'var scrollbottom = false; if (field.scrollTop + field.offsetHeight > field.scrollHeight - 10) scrollbottom = true; document.getElementById("chatfield").appendChild(dv); if (scrollbottom) field.scrollTop = field.scrollHeight;');
- funcstr = funcstr.replace(/.+while \(field\.scrollHeight > field\.clientHeight\) \{\n.+field\.children\[0\]\.remove\(\);\n.+\}/g, '');
- eval(funcstr);
- document.getElementById("chat_tab").onclick = function () {
- selected_tab = "chat_tab";
- document.getElementById("chatfield").style.display = "block";
- document.getElementById("userList").style.display = "none";
- chatTab.style.backgroundColor = "grey";
- chatTab.style.color = "white";
- userListTab.style.backgroundColor = "";
- userListTab.style.color = "";
- chatnum = 0;
- chatTab.innerText = "Chat";
- field.scrollTop = field.scrollHeight - field.offsetHeight;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement