Advertisement
falling1

egedraw chat history

Nov 7th, 2022 (edited)
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // this is now useless becausse there was a recent chat history update
  2. funcstr = onmes.toString();
  3. 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;');
  4. funcstr = funcstr.replace(/.+while \(field\.scrollHeight > field\.clientHeight\) \{\n.+field\.children\[0\]\.remove\(\);\n.+\}/g, '');
  5. eval(funcstr);
  6.  
  7. document.getElementById("chat_tab").onclick = function () {
  8.         selected_tab = "chat_tab";
  9.         document.getElementById("chatfield").style.display = "block";
  10.         document.getElementById("userList").style.display = "none";
  11.         chatTab.style.backgroundColor = "grey";
  12.         chatTab.style.color = "white";
  13.         userListTab.style.backgroundColor = "";
  14.         userListTab.style.color = "";
  15.         chatnum = 0;
  16.         chatTab.innerText = "Chat";
  17.         field.scrollTop = field.scrollHeight - field.offsetHeight;
  18.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement