Advertisement
GaztoofV2

Untitled

Mar 7th, 2021
1,262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function format_before_send(commaParam) {var pls = content = commaParam.replace(/(https?:\/\/|www\.)[^\s"<>{}`]+/g, (name) => {let snippet = name;let ch = /:[\w?]+:|<3|:-P|:-\)|:-D|;-\)/g;return snippet.match(ch) && (name = name.replace(snippet.match(ch)[0], " " + snippet.match(ch)[0])), name;});lastMessageStr = commaParam;return pls.substring(0,249);}
  2. document.getElementById('message_input').setAttribute('maxLength', -1);
  3. var lastMessageStr = 'pls';
  4. Shoutbox.socket.on(2, t=>{
  5. if(t.message.uid == uid){
  6. console.log("ok time to edit to: " + lastMessageStr);
  7. Shoutbox.socket.emit(4, {"id":t.message.id, "message":lastMessageStr});
  8. }
  9. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement